2

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 3

8

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
  • 1
    Don't forget to the firewall (defaults to allowing port 22 on CentOS)
    – Ophidian
    Jan 25, 2010 at 15:48
2

The manpage for useradd (and optionally adduser) commands should help you with setting up users on the box.

0

just set up a new user they can automatically connect with ssh

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .