Skip to content
All articles
Cybersecurity

How to enable ssh root access in Ubuntu

admin 1 min read

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