I can connect to SSH just fine using the generated keys for my main user (pi) but whenever I try to connect using a different user name I've created it returns "No supported authentication methods available (server sent publickey)"

I'm stumped why it doesn't work when I change user names. Could it be a permission problem of some sort?


the problem might be you have disabled password authentication, therefore your new users cannot log in. please, check your /etc/ssh/sshd_config for

PasswordAuthentication no

change it to yes and then

sudo /etc/init.d/ssh reload
| improve this answer | |

Have you added the public key to authorized_keys file for the second user you are trying to log in with?

So for example:

Let's assume you log into your RPi remotely from another machine's terminal window. Let's also assume you generated your RSA key on that machine and copied the public key into


on your RPi.

You normally log in as pi and inside the .ssh/authoriuzed_key file is the public key you generated on the second machine so can log in without a password prompt.

If you now want to log in as "user2" to the same RPi, you will need to add the public key to

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.