serveroffer.lt forum


Enable SSH remote root login on Debian/Ubuntu

Tutorials thread

Enable SSH remote root login on Debian/Ubuntu

Postby serveroffer » 2020 Feb 11, 23:02

Some Debian and Ubuntu based servers have disabled remote root login by default, if you need to enable it, you have update SSH config file.

Option one:
Switch privileges for root access:
Code: Select all
su - root

Update SSH config the file with one line:
Code: Select all
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config

and restart SSH server
Code: Select all
service sshd restart

Now you should be able to connect using remote root.

Option two:
Switch privileges for root access:
Code: Select all
su - root

Open config file:
Code: Select all
nano /etc/ssh/sshd_config

search for line:
PermitRootLogin without-password
or
#PermitRootLogin without-password
Change line to:
Code: Select all
PermitRootLogin yes

Exit nano and restart SSH server
Code: Select all
service sshd restart
User avatar
serveroffer
Site Admin
 
Posts: 49
Joined: 2012 Jun 16, 18:31

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 8 guests

cron