我的印象是我只需将其添加到/etc/pam.d/sshd:
account required pam_access.so
这个/etc/security/access.conf:
-:root:ALL EXCEPT IPADDRESS
但这似乎没有奏效.
解决方法 在/ etc / ssh / sshd_config中# disable Root loginPermitRootLogin no## [ . . . ]## At the end of the file,add:## Allow Root Login via Key from admin BastionMatch Address 10.9.8.7 PermitRootLogin without-password总结
以上是内存溢出为你收集整理的linux – 从一个IP /主机名以外的所有IP地址限制root ssh全部内容,希望文章能够帮你解决linux – 从一个IP /主机名以外的所有IP地址限制root ssh所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)