-
-
Save 0ccupi3R/3cae1604f403984ade74783ca1d4c91b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pass='YOURPASSWORD' | |
for host in `cat ips` | |
do | |
sshpass -p $pass ssh -o ConnectTimeout=1 -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no root@$host "hostname" | |
done | |
### Using encoding to escape Shoulder Surfing ;) | |
vim tempfile | |
#In the file write your password | |
cat tempfile | openssl enc -base64 | |
#This will give you the encoded string of your password | |
#Paste the copied string from above to the below variable | |
pas='BASE64OFYOURPASSWORD' | |
sshpass -p `echo $pas | openssl enc -base64 -d` ssh root@host "hostname" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment