Web Hosting Talk







View Full Version : Disabling Root Logon


sbrad
02-26-2002, 08:43 AM
How do I disable root logon for SSH on Red Hat?

RackMy.com
02-26-2002, 08:49 AM
There is a configuration; PermitRootLogin which I think is located /usr/local/etc/sshd_config

sbrad
02-26-2002, 11:16 AM
Cool. Thanks.
Do I have to restart anything after I change that to no?

allan
02-26-2002, 11:39 AM
Originally posted by sbrad
Cool. Thanks.
Do I have to restart anything after I change that to no?

For open SSH (RPM version) the sshd config file is:

/etc/ssh/sshd_config

After you have made changes:

/etc/rc.d/init.d/xinetd restart

Should take care of it for you.

RackMy.com
02-26-2002, 11:56 AM
No bad for a Windows guys, might I dare to say :)

allan
02-26-2002, 12:22 PM
Originally posted by RackMy.com
No bad for a Windows guys, might I dare to say :)

[condescending unix guy]You done good, here's a nickel, buy yourself a real OS :D[/condescending unix guy]

Seriously -- you may be right, Red Hat often does funky stuff with their RPMs, so the ssh_config file could be in two different places depending on how the install was done. Best bet:


[allan@ns1 allan]$ locate ssh_config

DigitalXWeb
02-26-2002, 01:17 PM
Originally posted by RackMy.com
No bad for a Windows guys, might I dare to say :)

I'm impressed Mike.. Of course I also think you're in denial with *NIX systems ;) j/k

clocker1996
02-26-2002, 02:08 PM
Originally posted by uuallan


For open SSH (RPM version) the sshd config file is:

/etc/ssh/sshd_config

After you have made changes:

/etc/rc.d/init.d/xinetd restart

Should take care of it for you.

redhat rpm ssh doesnt run through xinetd

clocker1996
02-26-2002, 02:10 PM
run find / -name sshd_config

pico path/to/sshd_config
edit the permitrootlogin line
then once youare done
run :

/etc/rc.d/init.d/sshd restart