Knowledge Base - SSH
How to Setup Passwordless SSH Login — concise version
Setup SSH Passwordless Login
-
Create
~/.ssh/configentry for remote machine. -
Check for existing SSH key pair.
ls -al ~/.ssh/id_*.pub
-
If necessary, generate a new SSH key pair.
ssh-keygen -t rsa -b 4096
Press
Enterto accept the default file location and file name:Enter file in which to save the key (/home/yourusername/.ssh/id_rsa):
Press
Enterto leave passphrase empty:Enter passphrase (empty for no passphrase):
-
Copy the public key
orssh-copy-id remote_username@server_ip_addressssh-copy-id host_alias_as_it_appears_in_configYou will be prompted to enter the
remote_usernamepassword. -
Login to your server using SSH keys
After completing the steps above you should be able log in to the remote server without being prompted for a password.
To test it just try to login to your server via SSH:
ssh remote_username@server_ip_address