方法一:修改白名单/etc/hosts.allow或者黑名单/etc/hosts.deny(系统) 方法二:在/etc/ssh/sshd_config添加DenyUsers user或者 AllowUsers user (user即位要添加的用户名) 如果要添加多个用户的话,用空格隔开即可