문제

I have a machine in AWS EC2 platform. Its a linux platform, with the user named root having no password,

Now I have to setup, ssh key authentication on this machine, For that firstly, I installed cygwin, then I followed the following steps :

 1. ssh-keygen -t dsa -f ~/.ssh/<key name> -C "root@<ip>"
 2. cat ~/.ssh/<key name>.pub | ssh  root@<ip> "cat >> ~/.ssh/authorized_keys"

Now, when I do this, it asks for password, but I never setup any password on the user root.

Also if I does not supply password, it says access denied!!!

Where is the problem?

도움이 되었습니까?

해결책

Check the permissions on your ~/.ssh/authorized_keys they need to be 600 and also on the ~/.ssh directory, they need to be 700.

Also you can run your sash client with the -vvv option to get debug information.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top