ssh只允许自己定义的主机访问

来源:互联网 发布:结构的刚度矩阵 编辑:程序博客网 时间:2024/06/09 21:38
允许访问ip设置
#vi /etc/hosts.allow
sshd:192.168.10.110:allow
sshd:192.168.10.111:allow
sshd:192.168.10.112:allow
sshd:192.168.10.113:allow
sshd:192.168.10.114:allow
sshd:192.168.10.115:allow
sshd:192.168.10.116:allow

禁止IP访问设置
#vi /etc/hosts.deny
sshd:ALL



两个一起设置就只有上面允许的ip能访问服务器了
原创粉丝点击