Setting up an autologin account to a SSH server could prove a pretty useful thing to do, especially if you work on remote servers quite often. This means that login through SSH won’t prompt you for a password everytime you authenticate, but at the same time, keeps the high security standard of SSH.
Setting the SSH autologin is a pretty simple thing to do, just open a terminal on the computer you are connecting FROM and follow these steps:
Generate a RSA 2048bit public/private key pair (press enter to all prompts):
Generating public/private rsa key pair.
Enter file in which to save the key (/home/rev/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/rev/.ssh/id_rsa.
Your public key has been saved in /home/rev/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
| .+++.oo |
| .oB.o+ o |
| B *E* |
| . o+ = . |
| S. o |
| . |
Copy the public key to the remote server:
ssh-copy-id -i email@example.com
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Number of key(s) added: 1
Login to the ssh server:
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-27-generic i686)
Last login: Sun Jun 15 18:07:38 2014 from 192.168.100.7
No password was prompted.
To revert the changes, login to the remote SSH server and type:
rm -rf .ssh/authorized_keys