if sometime you want to make a connection to your remote computer via SSH,
you’ll prompted for password everytime you want to login.
here’s the 3 simple steps to make SSH without Password
1. Generate Key
execute this command :
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/xsatria/.ssh/id_rsa):[Enter key]
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Pess enter key]
Your identification has been saved in /home/xsatria/.ssh/id_rsa.
Your public key has been saved in /home/xsatria/.ssh/id_rsa.pub.
The key fingerprint is:
33:b3:fe:af:95:95:18:11:31:d5:………..
2. Copy Key to Remote Computer
$ ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
Note: ssh-copy-id appends the keys to the remote-host’s .ssh/authorized_key.
3. it Works now..
$ ssh username@remote-host
now, you wont prompted for a password anymore. hehe..