So.. I can login to my ubuntu machine using private-public key method.
But now I need to have a user with regular username - password login method.
If I try to simply login with username (without specifying RSA key) in putty, I get Disconnected: no supported authentication methods available (server sent: publickey) error.
How to fix this?
02 Answers
In the file /etc/ssh/sshd_config, change the line
#PasswordAuthentication yesto
PasswordAuthentication yesand resart sshd:
service sshd restart 0 You also may just run the given command into the terminal.
sed -i "s/PasswordAuthentication no/PasswordAuthentication yes/" /etc/ssh/sshd_configN.B. Here "PasswordAuthentication no" replace with "PasswordAuthentication yes"
So before run the command you may check using "sudo vim /etc/ssh/sshd_config" what has the value PasswordAuthentication.
Sometime it is written as "#PasswordAuthentication yes"
Then command will be sed -i "s/#PasswordAuthentication yes/PasswordAuthentication yes/" /etc/ssh/sshd_config
And for after Ubuntu 14.04
sudo systemctl restart sshOr for before Ubuntu 14.04
sudo service ssh restartHope this will work for you.
4