Enable Root Login via SSH In Ubuntu

Ubuntu Linux Forum
Post Reply
User avatar
hepek
Site Admin
Posts: 451
Joined: 24 Oct 2018, 00:03
Location: @HEPEK HQ
Contact:

Enable Root Login via SSH In Ubuntu

Post by hepek »

Enable root login over SSH


1. Login to your server as root.
2. As the root user, edit the sshd_config file found in:

Code: Select all

/etc/ssh/sshd_config:
3. Using VIM Editor:

Code: Select all

vim /etc/ssh/sshd_config
4. Add the following line to the file, you can add it anywhere but it’s good practice to find the block about authentication and add it there.

Code: Select all

PermitRootLogin yes
5. Save and exit the file.
6. Restart the SSH server:

Code: Select all

systemctl restart sshd
or

Code: Select all

service sshd restart
And that’s it! With the new line added and the SSH server restarted, you can now connect via the root user.
Post Reply

Return to “Ubuntu Linux”