一般有两种方法: 1、利用linux服务器防火墙(操作系统自带的iptables即可),仅允许指定IP访问sshd端口 2、利用linux服务器配置文件: /etc/hosts.allow ,加入行:(假定你的ip是210.13.218.11) sshd:210.13.218.11:allow