root access directly with ssh

one more question please, is there a way to ssh with root directly to my linode?

thanks again.

4 Replies

Obvious security concerns aside, there's nothing preventing you from setting "PermitRootLogin yes" in your sshd_config file and doing:

$ ssh root@aaa.bbb.ccc.ddd

Where aaa.bbb.ccc.ddd is the IP address of your linode.

I use:

ssh -l username hostname

for a direct login under a different user ID.

That being said, I would very strongly advise you to use only public-key authentication, especially if you're going to allow root logins. It's really a good idea even if you aren't, since if a password bruteforcer manages to find a working login/password combo, the kiddie running the script could log in and use a local root exploit against your system.

@rjp:

I use:

ssh -l username hostname

for a direct login under a different user ID.

That's exactly the same thing as doing:

$ ssh username@hostname

@Dietrich:

one more question please, is there a way to ssh with root directly to my linode?

thanks again.

As has been already said keypairs are much safer than passwords for this.

I'm sure I'm not alone in getting constant password guessing attempts on my linode.

The really quick guide to setting up passwordless root login to your linode:

on your home machine as your user do:

ssh-keygen -t rsa -b 1024

scp ~/.ssh/idrsa.pub to :~root/.ssh/authorizedkeys

on your linode:

set/check 'PermitRootLogin yes' is set in /etc/ssh/sshd_config.

optional - set 'PasswordAuthentication no' to stop password logins.

If you change the file restart sshd.

You should be able to get in with ssh root@ without a password.

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