设置SSH只允许指定IP才能访问

vim /etc/hosts.allow

sshd:192.168.31.109:allow //只允许192.168.31.109登录
vim /etc/hosts.deny

sshd:ALL //开启白名单,只允许192.168.31.109登录
systemctl restart sshd ,重启sshd

posted @ 2020-06-23 11:39  jiftle  阅读(3489)  评论(0编辑  收藏  举报