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 \~\]#

相关推荐
爱写Bug的小孙11 分钟前
多智能体概述
服务器·数据库·ai·oracle·agent·多智能体·agentscop
文人sec14 分钟前
【Linux 服务器上搭建 JMeter 性能测试与监控环境(实战版)】
linux·运维·服务器·jmeter·性能测试
papaofdoudou18 分钟前
Linux内核的边界在哪里?
linux·运维·服务器
路由侠内网穿透19 分钟前
本地部署开源零信任网络平台 NetBird 并实现外部访问
运维·服务器·数据库·开源
zzzsde23 分钟前
【Linux】文件:基础IO
linux·运维·服务器
wanhengidc37 分钟前
服务器托管对企业的作用
大数据·运维·服务器·分布式·智能手机
基于底层的菜鸟41 分钟前
VsCode GitHub Copilot Chat 节省request
服务器·copilot·ai编程
Thomas.Sir42 分钟前
Shiro认证与授权:Java安全框架的核心机制
java·安全·shiro·权限控制
北京软秦科技有限公司1 小时前
AI报告文档审核守护医疗安全:IACheck助力口腔器械消毒检测报告全面合规
大数据·人工智能·安全
上海云盾安全满满1 小时前
什么是渗透测试,渗透测试在系统安全方面起什么作用
安全·系统安全