Welcome, Guest! Registration

loc2log

Friday, 2024-03-29
Main » 2012 » March » 31
Here is how to enable ssh access root on RedHat(ish) systems.

You need to change in /etc/ssh/sshd_config:

PermitRootLogin no
to
PermitRootLogin yes
and let sshd know its configuration needs to be re-read.

Here is a quick'n'dirty way to be executed from root account, or with sudo,
to enable ssh root access:

sed -e "s/PermitRootLogin no/PermitRootLogin yes/" -i /etc/ssh/sshd_config
/sbin/service sshd reload
to disable ssh root access:
sed -e "s/PermitRootLogin yes/PermitRootLogin no/" -i /etc/ssh/sshd_config
/sbin/service sshd reload

Views: 1260 | Added by: loc2logg | Date: 2012-03-31 | Comments (0)