Tuesday, February 3, 2015

Securing SSH on CentOS 7

vi  /etc/ssh/sshd_config


Port 23456
PermitRootLogin no
AllowUsers <<username>>
Protocol 2

service sshd restartyum install policycoreutils-python
semanage port -a -t ssh_port_t -p tcp 23456

Change the port number in
/usr/libfirewalld/services/ssh.xml
#Otherwise 'no route to host' error

firewall-cmd --reload


Client >> ssh -p 23456 serverip
 
More info http://wiki.centos.org/HowTos/Network/SecuringSSH

No comments:

Post a Comment