在Linux服务器上添加ip白名单允许ssh登录访问
Posted 蜗牛前进的方向
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Linux服务器上添加ip白名单允许ssh登录访问相关的知识,希望对你有一定的参考价值。
vi /etc/hosts.allow
# hosts.allow This file contains access rules which are used to
# allow or deny connections to network services that
# either use the tcp_wrappers library or that have been
# started through a tcp_wrappers-enabled xinetd.
#
# See ‘man 5 hosts_options‘ and ‘man 5 hosts_access‘
# for information on rule syntax.
# See ‘man tcpd‘ for information on tcp_wrappers
#下面为允许通过制定ip访问服务器
sshd:xxx.xxx.xxx.xxx:allow
sshd:xxx.xxx.xxx.xxx:allow
sshd:172.16.0.0/255.255.0.0:allow
sshd:192.168.0.0/255.255.0.0:allow
以上是关于在Linux服务器上添加ip白名单允许ssh登录访问的主要内容,如果未能解决你的问题,请参考以下文章