Login into server1 and run the following commands.
Now try to login to server2, it will won’t prompt you to enter password. Try and let me know.
ssh-keygen -t rsa
ssh user@server2 mkdir -p .ssh
cat .ssh/id_rsa.pub | ssh user@server2 'cat >> .ssh/authorized_keys'
ssh user@server2 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
Now try to login to server2, it will won’t prompt you to enter password. Try and let me know.
ssh user@server2
0 comments:
Post a Comment