ssh-keygen ssh-copy-id hostname
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.
note: if non standard port use this "ssh-copy-id "[email protected] -p 31337"
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
put this on your file
Host server1 User root HostName SERVER.IP.ADDRESS.HERE Port 31337
after all of this is done, use this on your terminal to connect
note: if you get this error: “Bad owner or permissions on .ssh/config”
FIX: chmod 600 ~/.ssh/config