Knowledge Base - SSH
How to Setup Passwordless SSH Login — concise version
Setup SSH Passwordless Login
-
Create
~/.ssh/config
entry 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
Enter
to accept the default file location and file name:Enter file in which to save the key (/home/yourusername/.ssh/id_rsa):
Press
Enter
to leave passphrase empty:Enter passphrase (empty for no passphrase):
-
Copy the public key
ssh-copy-id remote_username@server_ip_address
ssh-copy-id ~/.ssh/config alias
You will be prompted to enter the
remote_username
password. -
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