Thursday, December 2, 2010

Seting up a new ssh user on a centos box

I'm new to setting up users on SSH. I have a centos bos, but not sure how to setup new users so that they are able to connect via ssh

Answer

In a default configuration, with ssh enabled, all normal users are allowed to connect via ssh.
To create normal users you can use either the system-config-users tool, or the useradd command.
To check if sshd is running type

chkconfig --list sshd
And look for output similar to

sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off

Moreover, the firewall must also allow ssh. Default behavior during install is to have ssh enabled, with the firewall allowing access. You can configure the firewall by using the system-config-securitylevel-tui utility and selecting 'Customize'. Or you can check the firewall configuration directly by issuing

iptables -L

1 comment:

My Mine