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
3 Answers
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
-
1Don't forget to the firewall (defaults to allowing port 22 on CentOS)– OphidianJan 25, 2010 at 15:48
The manpage for useradd
(and optionally adduser
) commands should help you with setting up users on the box.