I am usera, I want to ssh userb@remote_ubuntu. so I copied usera authorized_keys to userb .ssh directory and renamed it id_rsa.usera (there is already a authorized_keys file there for when userb is doing ssh into the server.

I even did systemctl restart sshd, but I am getting Permission denied (publickey).

what did I do wrong?


1 Answer 1


I append the content of the second public key to authorized_keys file, and it worked!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .