Skip to content

Instantly share code, notes, and snippets.

@talyguryn
Created May 16, 2019 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talyguryn/acee1431c0a208240fcd31f17024d854 to your computer and use it in GitHub Desktop.
Save talyguryn/acee1431c0a208240fcd31f17024d854 to your computer and use it in GitHub Desktop.

Enable ssh root login access

Set a new password for the root user.

sudo passwd

Now open for editing ssh daemon's config file /etc/ssh/sshd_config.

Set PermitRootLogin value to yes to enable logging is as root.

PermitRootLogin yes

Also check value of PasswordAuthentication. If it is set to no then set to yes for security reasons.

PasswordAuthentication yes

Then restart ssh service:

service ssh restart

Now you can log in to your server as root user.

ssh root@domain.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment