Installing OpenSSH on Centos 6.x

Configuration for private/test environment only - do not use in production! You need to execute all steps as root.


Download the OpenSSH package (for server and client)

# yum install openssh-server
# yum install openssh-clients

Enable OpenSSH on startup and start the service

# chkconfig sshd on
# service sshd start

Disable the firewall:

# service iptables stop
# service ip6tables stop
# chkconfig iptables off
# chkconfig ip6tables off
Additional setup:

Edit the openssh server config:

# vi /etc/ssh/sshd_config
  • to allow connection to root set "PermitRootLogin yes" (not recommended - use at own risk)
  • to allow only specific users to connect add them under "Allowuser" (eg. "Allowuser Huey Dewey Louie")

Restart the service to apply changes

# service sshd restart