SSH允许部分ip登录 编辑/etc/hosts.allow文件 [root@localhost ~]vim /etc/hosts.allow sshd:允许登录的ip地址:allow 编辑/etc/hosts.deny文件 [root@localhost ~]vim /etc/hosts.deny sshd:ALL:deny 两个文件编辑完成后重启sshd服务 service sshd restart