Skip to content

Instantly share code, notes, and snippets.

@whimbree
Created May 29, 2018 22:10
Show Gist options
  • Save whimbree/2f552887a7250519839011cd3a840849 to your computer and use it in GitHub Desktop.
Save whimbree/2f552887a7250519839011cd3a840849 to your computer and use it in GitHub Desktop.
SSH Login as Root
If you want to login as root using SSH or SFTP you need to edit the config of SSHD, do this:
Login, and edit this file: sudo nano /etc/ssh/sshd_config
Find this line: PermitRootLogin without-password
Edit: PermitRootLogin yes
Close and save file
reboot or restart sshd service using: /etc/init.d/ssh restart
Set a root password if there isn't one already: sudo passwd root
Now you can login as root, but I recommend you using strong password or ssh-keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment