码迷,mamicode.com
首页 > 系统相关 > 详细

在Linux服务器上添加ip白名单允许ssh登录访问

时间:2018-09-06 20:04:16      阅读:928      评论:0      收藏:0      [点我收藏+]

标签:start   access   ons   which   started   tar   options   library   rar   

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登录访问

标签:start   access   ons   which   started   tar   options   library   rar   

原文地址:https://www.cnblogs.com/ddpeng/p/9600049.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!