Secure connection without a password

There are numbers of tutorials on the net on how to configure access from one machine to another without typing a password.
Here is the real way to do it.
First generate a pair of keys:

ssh-keygen -t rsa 

It’s important to choose a passphrase. Don’t leave it blank.
Then you need to copy the public key to the other server

ssh-copy-id -i .ssh/>

Make sure that ssh-agent is running.
Add a key using ssh-add


Try connecting
Should be working.

Leave a Reply

Your email address will not be published.