SSH keys for Password-less Logins
[php]ssh-keygen
ssh-copy-id hostname[/php]
You run the first command once to set up your public/private key pair and then you run the second command once for each host you want to connect to.
[php]note: if non standard port use this "ssh-copy-id "user@host -p 31337"[/php]
now you have a password less login but still you will be prompt with the password you created on ssh-keygen but its more less troublesome rather then the actual password for each servers, and to make it more easier, we use alias on your ~/.ssh/config
nano ~/.ssh/config
put this on your file
[php]Host server1
User root
HostName SERVER.IP.ADDRESS.HERE
Port 31337[/php]
after all of this is done, use this on your terminal to connect
[php]ssh server1[/php]
note: if you get this error: “Bad owner or permissions on .ssh/config”
[php]FIX: chmod 600 ~/.ssh/config[/php]