Wednesday, October 29, 2008

Deny root user for ssh

Deny root user for ssh

We can deny root user for ssh. For this we have to edit the sshd-config file. To do this we have to write the following command:
vi /etc/ssh/sshd-config
Now we will find out a line
PermitRootLogin=yes
We will replaced the yes with no.
PermitRootLogin=no
Now not only the root, but also all super user can not ssh at this ssh server.
To allow any user we have to add the following line at the last line of the configuration.
AllowUsers reza
This command will allow reza user.
AllowUsers reza nayem
This command will allow reza and nayem, both users.
We must have to restart the service after editing the file. Otherwise it wont work.
Any advice regarding this issue is highly expected

1 comment:

Anonymous said...

expomobre
yfgg