In order to enable root SSH login, you need to change the sshd_config.

 

Important: You need to have a root password set in order to login via SSH. Read more: https://starkrdp.net/knowledgebase/12/How-to-gain-root-access.html

 

1. Login to your server as any user, then login as root using this command:

su

2. Open the sshd_config:

nano /etc/ssh/sshd_config

3. Add a line in the Authentication section of th efile that says "PermitRootLogin yes". This line may already exist and be commented out with a "#". In this case, remove the "#".

# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

4. Save the updated file using CTRL+X type in y and press ENTER

5. Restart the SSH server:

service sshd restart

 

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)