Bash

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 »

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 »

Sidebar