I've just switched my server to ubuntu and everything works except the ssh server. I've installed the sshd server and I generated on my mac ( client ) a key like this:

ssh-keygen -t rsa -C "my@gmail.com" where my@gmail.com is my email I didn't know what else I needed to put here.

I copied the public ssh key from my mac to my ubuntu server and added the content to the .ssh/authorized_keys file on ubuntu. I restarted the ssh server everything.

Now when I try to login via my mac with the command:

ssh or even ssh my@

I always get permission denied (publickey)

I don't know how to fix this? Can someone help me? I think it has something to do with the my@gmail.com but I don't know for sure. I just want to login from lan or from everywhere else.


I found the problem. The line that defines the authorized_keys was commented. Uncommented this and everything works.

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.