Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)

Wednesday, November 21, 2018

ssh login issue - linux


The user is getting below error when he is trying to login to server via putty:

Error: disconnected no supported authentication methods available (server sent publickey)

The user is getting login prompt and so after entering username he is trying to hit enter so he can use his password, but the screen shows the error as mentioned above.

Ans: There are two methods for authentication
1.     Password authentication
2.     ssh key authentication

After entering username the server will authenticate the user first via password and if it not successful then it will ask for key. The authentication is getting done by checking /etc/ssh/sshd_config file

The possibilities could be that in sshd_config file we might have disabled the password authentication and so server is trying to check public key as authentication from password is failed. But the user has not provided the key so user got above error.

To resolve this, edit the file /etc/ssh/sshd_config and change line

root@cloud home]# vi /etc/ssh/sshd_config
PasswordAuthentication no


to

root@cloud home]# PasswordAuthentication yes


and restart the ssh daemon to re-read sshd_config file

root@cloud home]# service sshd restart




Regards,
Kiiran B Jadhav

No comments:

Post a Comment