Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #---------------------------------------------------------------------------
- # sshpass allows to run remote commands
- # for example
- #while read ip; do
- # echo -n "$ip: " >> local_file.log;
- # sshpass -p 'your password' ssh user@$ip remote_command >> local_file.log
- #done < ips.txt
- # ips.txt would be an ip address per line
- #---------------------------------------------------------------------------
- sudo apt-get install sshpass
- # ufw is for firewall port 22 is for ssh
- sudo ufw allow 22
- sudo apt-get install openssh-server
- # this sets the default configs for ssh
- sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
- # this makes it runnable or something
- sudo chmod a-w /etc/ssh/sshd_config.original
Advertisement
Add Comment
Please, Sign In to add comment