jeudi 10 avril 2014

Linux - ne demander mot de passe quand il n'y a aucun mot de passe - Stack Overflow


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.



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.


0 commentaires:

Enregistrer un commentaire