SSH disable root login on server

Asked by Andree

Hi,

i would like to disable the root login via ssh on my server.

I added "PermitRootLogin no" (without "") to /etc/ssh/ssh_config and then did a /etc/init.d/ssh restart but this doesn't work.

Does anyone know what's wrong?

My server is a Ubuntu 10.04. Since it is running in a shared environment the server was configured as a LAMP server and also ssh was already configured.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openssh Edit question
Assignee:
No assignee Edit question
Solved by:
Andree
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

try:

sudo service ssh stop; sudo service ssh start

or alternatively, reboot the system.

Revision history for this message
Andree (dreewill-deactivatedaccount) said :
#2

hmm that didn't work. I did a reboot but i still can log in as root via ssh.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

The root account should be disabled, so you should fail authentication anyway

Revision history for this message
Andree (dreewill-deactivatedaccount) said :
#4

my fault! was trying to add PermitRootLogin sshd_conf and not to ssh_conf.