Linux

SSH without a Password

1. Log into the source computer (the computer you will use to log into the destination).   2. Check if  you already have an SSH key generated.  This key identifies you as the user. ls ~/.ssh | grep id_rsa   If the above command returned results, do not create a new key and skip to… read more »

tcpdump

TCPDump Captures network traffic. Must be ran as root. Common Usage Capture SNMP traffic from a host in zentrap sudo tcpdump -i any -n udp and src host 10.10.10.10 Capture SNMP traffic from a host on the zentrap host sudo tcpdump -i any -n udp and src host 10.10.10.10 and port 162 Configuration Switch Name… read more »

Bash Loops

Examples of various looping scripts using bash Arrays and Counts Loop through an incremental count for INDEX in {0..5}; do echo $INDEXdone# one linerfor I in {0..5}; do echo $INDEX; done   Files Looping through items in a file Using cat for ITEM in `cat FILE.NAME`; do echo $ITEM done #one liner for ITEM in… read more »

How to connect to a Cisco Device using USB Console

This article was written using instructions for Ubuntu, but was actually tested on a Raspberry Pi. Cool, eh? https://www.youtube.com/watch?v=PRwHNd-u_cA Install minicom $ sudo apt-get install minicom Find the device $ dmesg | grep ttyUSB [ 5.494345] usb 1-1.2: Moschip 2 port adapter converter now attached to ttyUSB0 Note the device: In this case it is… read more »

Linux TOP command

1st Row – top top – 11:37:19 up 30 min, 3 users, load average: 0.02, 0.01, 0.06 current time (11:37:19) uptime of the machine (up 30 min) users sessions logged in (3 users) average load on the system (load average: 0.02, 0.01, 0.06) the 3 values refer to the last minute, five minutes and 15… read more »

Install PHP 5.3 on Ubuntu 17.10

I know, I know, I know, I know! I need to update my code! If I haven’t said it already, I know! But… I don’t have time to updated hundreds upon hundreds of lines of code, so I’m taking the easy way out. I found the steps to do it here: http://sandeep-bisht.blogspot.com/2017/08/phpbrew-install-php-53-in-ubuntu-1604.html The system I’m… read more »

How to test and patch your server for the Shellshock exploit

To test your system to see if it is vulnerable to the ShellShock exploit, run the following command from the command line: env check=’Not vulnerable’ x='() { :;}; check=Vulnerable’ bash -c ‘echo $check’ If the reply from the command says “Vulnerable”, you should patch it immediately! The fix is actually quite simple and only takes… read more »

How to create a CSR (Certificate Signing Request) in Linux using OpenSSL

Before you can purchase or create your own self signed SSL certificate, you must first create a CSR (Certificate Signing Request) and a Private Key. These two files much be created simultaneously or the resulting SSL certificate will not work. As root, run the following command: openssl req -nodes -newkey rsa:2048 -keyout sub.domain.com.key -out sub.domain.com.csr… read more »

How to Resize a Linux Cloud Disk Size After an Upgrade

Scope This article was written to outline the steps required to resize the disk space on a Codero Cloud instance that had previously been upgraded to a larger size.   Requirements A Codero Cloud account A running Codero Cloud instance that had previously been upgraded to a larger size.   Procedure   Log In Log… read more »

Sidebar