First of all install SSH server and agent respectively
STEP 1 :
Generate a authentication keys for User A:
STEP 3:
Copy User A's key to User B's :
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.
STEP 4:
Trying logging
It will allow password less login.
STEP 1 :
Generate a authentication keys for User A:
ssh-keygen -t rsaSTEP 2:
- 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
STEP 3:
Copy User A's key to User B's :
ssh-copy-id userb@192.168.1.1
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.
STEP 4:
Trying logging
ssh userb@192.168.1.1
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
No comments:
Post a Comment