hosts.allow和hosts.deny配置

有个单机环境限制ssh登录,有多种方式,这里选择了配置hosts.allow和hosts.deny

root@db \~\]# more /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 # sshd:172.100.100.56:allow sshd:172.100.100.57:allow sshd:172.100.100.42:allow sshd:172.100.100.43:allow sshd:172.100.100.46:allow \[root@db \~\]# cat /etc/hosts.deny # # hosts.deny This file contains access rules which are used to # deny connections to network services that either use # the tcp_wrappers library or that have been # started through a tcp_wrappers-enabled xinetd. # # The rules in this file can also be set up in # /etc/hosts.allow with a 'deny' option instead. # # See 'man 5 hosts_options' and 'man 5 hosts_access' # for information on rule syntax. # See 'man tcpd' for information on tcp_wrappers # sshd:all:deny \[root@db \~\]#

相关推荐
郝学胜-神的一滴1 小时前
Linux命名管道:创建与原理详解
linux·运维·服务器·开发语言·c++·程序人生·个人开发
宾有为1 小时前
【Linux】Linux 常用指令
linux·服务器·ssh
wanhengidc1 小时前
云手机性能如何?
运维·服务器·科技·智能手机·云计算
wdfk_prog1 小时前
[Linux]学习笔记系列 -- [block]bio
linux·笔记·学习
ajassi20001 小时前
开源 Linux 服务器与中间件(十三)FRP服务器、客户端安装和测试
linux·服务器·开源
Hellc0072 小时前
Docker部署BaGet私有NuGet服务器:从入门到备份恢复完整指南 二
服务器·docker·eureka
XH-hui2 小时前
【打靶日记】群内靶机vm1
linux·网络安全
Eric.Lee20213 小时前
ubuntu 安装 Miniconda
linux·运维·python·ubuntu·miniconda
会飞的土拨鼠呀3 小时前
通过Linux进程id找到程序路径
linux·服务器·网络
杭州泽沃电子科技有限公司3 小时前
在线监测:为医药精细化工奠定安全、合规与质量基石
运维·人工智能·物联网·安全·智能监测