Back to Research Interests

How to enable ssh root access in Ubuntu

November 18, 2025 admin

This is not recommended for security reasons but in some cases can be useful to temporarily enable it

Edit the file /etc/ssh/sshd_config

Command:

nano /etc/ssh/sshd_configadd the line:

Code:

PermitRootLogin yesreboot the system or type the command below

Command:

systemctl restart sshd.service*Note: When root ssh access is not needed anymore remember to comment the added line with a # at the beginning