Sunday, August 16, 2009

SSH – Disable root logins

By default machines running Fedora, RedHat, and their variants allow root to ssh directly into them. In order to disable this and force users to first ssh into these boxes as themselves you should edit the sshd_config file.

To do this simply open the sshd_config file with your favorite text editor, I use vi.

Next, locate the line “PermitRootLogin”.

Remove the comment and change the value to no.

Save, close, and restart sshd.

0 comments: