Connecting through SSH without password

To connect through SSH to a web-server without entering a password, one has to perform the following steps:

1. Run the command ssh-keygen

$ ssh-keygen

Save the key in the default location or any location you desire and provide the passphrase, which has to be atleast 4 letters long. The default location for the key is:


Now to connect to SSH with this key, we will have to run the following command:

$ ssh-copy-id -i /home/<user>/.ssh/ server

Note :  Replace <user> with your username or home folder.

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.