How do i fix: Permission Denied (publickey)

Hello guys!
I'm very new to all of this and I'm trying to set up a linode for VPN. This might be a very beginner question. But when i try to login via my local machine using: ssh -i ~/.ssh/id_rsa xxx@ip_address -p xx i get Permission Denined (publickey)

3 Replies

It looks like you're not using the public key, but the private key. When you added your key to the ~/.ssh/authorized_keys directory on your Linode, that key will want to pair with the private key on your local machine. If that connection isn't made, then you'll get permission denied.

Also, if you've made the changes to your Linode, make sure you restart the ssh daemon to ensure it pulls in any changes.

SSH Daemon Options - Restart the SSH service

Since you're unable to connect to your Linode via SSH, you may need to make any changes via Lish(Linode Shell).

Also, you can look at this guide for more information on the public key
Authentication https://www.linode.com/docs/security/securing-your-server/

I have the same problem and only thing I am finding are useless not working commands and links to other sources.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct