Enabling Passwordless SSH login in 4 simple steps

Steps to Enabling Password-Less SSH login :

First of all install SSH server and agent respectively

STEP 1 :

Generate a authentication keys for User A:

$ssh-keygen -t rsa


  • Change the permissions of .ssh to 700


$chmod 700 /home/user/.ssh


  • Change the permissions of .ssh/authorized_keys to 600


$chmod 600 /home/user/.ssh/authorized_keys


Copy  User A’s key to User B’s :

ssh-copy-id  userb@

This will ask for password of User B. When you have entered correct password the key will be copied to User B’s /home/.ssh/authorized_keys directory.


Trying logging

ssh userb@

It will allow password less login.

  • If there are any problems make sure to check permission of the directories. most of the time people have problem with permissions only.
  • Make sure the ssh server is working if shows error stating unable to connect


Blogger & Assc Cloud Architect

Site Footer

%d bloggers like this: