iptables - CentOS下如何限制指定用户只能在指定IP登录?
phpcn_u1582
phpcn_u1582 2017-04-24 15:59:43
0
1
682

如题。用 hosts 针对的是所有用户。
貌似可以用配置 /etc/ssh/sshd_config 方式去限制。
貌似也可以配置 iptables 去限制。
但不知哪种方法更好?该如何配置。能否详细讲解?谢谢!

phpcn_u1582
phpcn_u1582

Antworte allen(1)
伊谢尔伦

针对LZ提出的需求,建议用sshd_config,iptables不适合。
配置:AllowUsers wangshuo@172.31.11.237
注意修改完毕后重启服务:service sshd restart

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!