如题。用 hosts 针对的是所有用户。
貌似可以用配置 /etc/ssh/sshd_config 方式去限制。
貌似也可以配置 iptables 去限制。
但不知哪种方法更好?该如何配置。能否详细讲解?谢谢!
伊谢尔伦2017-04-24 16:01:43
In view of LZ’s requirements, it is recommended to use sshd_config, iptables is not suitable.
Configuration: AllowUsers wangshuo@172.31.11.237
Note that after modification, restart the service: service sshd restart