I installed this package on my Raspberry Pi:

sudo apt-get install libssh2-1-dev libssh2-php

And when I rebooted and was going to login with Winscp I got the error message:

Disconnected: No supported authentication methods avaible (server sent: publickey)

I'm afraid that I just broke my Pi or something. I don't want to lose my database and all that. What should I do? I have tried to uninstall it and rebooting but the same message keeps coming up.


1 Answer 1


in your sshd config file allow password login. and restart ssh. First your raspberry pi connect with a screen and then login and make changes to sshd config file as allow password on. Then restart ssh service. and connect with putty or any other client.

Use a Match block at the end of /etc/ssh/sshd_config:

PasswordAuthentication yes

Then restart sshd service:

service ssh restart
  • 1
    @JoelFransson okay so mark this answer as correct so that other can get benefit of it. if you like
    – BetaDev
    Commented Dec 18, 2016 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.