vi /etc/hosts.allow
sshd:192.168.0.100:allow
sshd:192.168.0.*:allow //允許單一IP或網段
sshd:all:deny //擋全部
centos5
service sshd restart
centos7
systemctl restart sshd
修改port
vi /etc/sshd/sshd_config