1,只允许某个IP登录,拒绝其他所有IP在 /etc/hosts.allow 写:sshd: 1.2.3.4在 /etc/hosts.deny 写:sshd: ALL 用 iptables 也行:iptables -I INPUT -p tcp --dport 22 -j DROPiptables -I INPUT -p tcp --dport 22 -s 1.2.3.4 -j ACCEPT
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号