1. using rsa algorithm
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
2. using dsa algorithm
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
3. verify using below command
ssh localhost
4. If still asking the password again and again then remove existing data
rm -r ~/.ssh
5. After removing the existing data .. repeat step1 or step2
Share this article with your friends.
No comments :
Post a Comment