Wednesday, 1 June 2011

How To Enable SSH Login Access For Linux Users

So you just added a new user to your linux box and you want to give SSH login access (OpenSSH server in my example) to that user. You just need to edit the sshd_config file and add the user for SSH access.

To do this, open the /etc/ssh/sshd_config file and search for the AllowUsers string. Now just add the username of newly created user at the end of the line just as below:

#Adding new user samar for SSh access
AllowUsers nano root samar

Also, the SSh access for root account can be configured as well. For that, search the PermitRootLogin string and to enable root login set it as yes as below:

PermitRootLogin yes

This enables SSh access to the root user as well. But enabling the root login is not the good security practice. I hope this HowTo helps you. :)