Question

Setup SSH keys but server still prompts for password?

  • Posted September 19, 2012

Hello,

I followed the SSH Keys tutorial here at DO but the server still prompts for my user password (not passphrase) when I login. I checked ~/.ssh/authorized_keys and there is only 1 line so it looks like the key copied over OK. I am asked for my user password when I use either the HTML 5 console access program or PuTTY. I am not logging in as root, but the user account has root privileges.

I’m new to SSH so I apologize for not being able to explain the issue too well. I’m using Ubuntu 12.04 (server edition, no desktop).

Tutorial: https://www.digitalocean.com/community/articles/how-to-set-up-ssh-keys--2

Subscribe
Share

****Hi my query: for connection two servers without passwords using ssh

for this i generated id_rsa and id_rsa.pub by using command " ssh-keygen" i copied the id_rsa.pub in the remote server which i want to connect to from my server as “authorized_keys” in ~/.ssh/ directory ie ( in remote server i placed id_rsa.pub file as "~/.ssh/authorized_keys " but still i’m not able to connect to remote server without password. can anyone give the solution why it is happend. u can also mail me saiseshan.velidimalla@gmail.com for solution


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Possible it helps:

All the directories starting from root and up to the .ssh directory in your home directory must not have write permission for either ‘group’ or ‘other’

Do:

chmod g-w,o-w ~/.ssh
chmod g-w,o-w ~./ssh/authorized_keys

http://superuser.com/questions/431911/ssh-asking-for-password-for-one-user-and-not-another

Anyone here using DSA keys and a Ubuntu 16.04 droplet (with OpenSSH 7.x by default) should note that DSA keys (pubkey starting with “ssh-dss”) are not accepted by default anymore. This issue caused problems very similar to ones described in the original question. This is understandable because if the keys are not accepted, the ssh reverts back to asking the password.

See:

I am having a similar issue to the author of opening post.

Followed these directions: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04

Have added a new user to the server and added .ssh/authorized_keys . When I login with this new user I am still required to input password.

I would like to completely disable passwords and just use ssh. Does anyone know what the issue may be?

I am having a similar issue to the author of opening post.

Followed these directions: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04

Have added a new user to the server and added .ssh/authorized_keys . When I login with this new user I am still required to input password.

I would like to completely disable passwords and just use ssh. Does anyone know what the issue may be?

just type in ssh root@xxxxxx, if you setup a different key besides id_rsa just use ssh -i /path/to/key_rsa root@xxxxxxxx

just type in ssh root@xxxxxx, if you setup a different key besides id_rsa just use ssh -i /path/to/key_rsa root@xxxxxxxx

just type in ssh root@xxxxxx, if you setup a different key besides id_rsa just use ssh -i /path/to/key_rsa root@xxxxxxxx

just type in ssh root@xxxxxx, if you setup a different key besides id_rsa just use ssh -i /path/to/key_rsa root@xxxxxxxx

just type in ssh root@xxxxxx, if you setup a different key besides id_rsa just use ssh -i /path/to/key_rsa root@xxxxxxxx

just type in ssh root@xxxxxx, if you setup a different key besides id_rsa just use ssh -i /path/to/key_rsa root@xxxxxxxx