Can't connect to Linode with root user via SSH

My OS: macOS High Sierra

My Linodes OS: Ubuntu 14.04 LTS

For some reason I can't login to my Linode as the root user, whenever I try to login it always says:

Permission denied (publickey).

But I can still login as my limited user that I setup. I'm only able to login as the root user if I go into /etc/ssh/sshd_config and change PermitRootLogin and PasswordAuthentication to yes. I have followed the "Getting Started with Linode" and "Securing Your Server" guides multiple times. I have also deleted my Linode and created a new one multiple times but nothing seems to work. Any help would be appreciated.

Thanks,

Luke

2 Replies

Your questions is two days old… is it solved already?

Just my two cents:

if you set PermitRootLogin to "yes", this will enable you to login as root.

Some people (most) will disable this function, because it is unsecure to allow root login via ssh. as far as i know the getting started guide and securing your server guide tell you to diasble "PermitRootLogin".

So you should disable PermitRootLogin. Every time you connect via ssh, you login as the limited user. when you need to be root, type "sudo". for example: "sudo apt-get install apache". the console will prompt you to enter the root password. so you can execute commands that need root permissions while logged on with your limited user.

Did you add your public key to /root/.ssh/authorized_keys file for root? Does that file and all of its parents have correct (restrictive) permissions?

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