Welcome, Guest! Registration

loc2log

Friday, 2024-04-26
Main » 2012 » March » 31 » How to get ssh for root
1:05 AM
How to get ssh for root
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: 1265 | Added by: loc2logg | Tags: ssh, Linux, RedHat | Rating: 0.0/0
Total comments: 0
Only registered users can add comments.
[ Registration | Login ]