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

相关推荐
H Journey5 分钟前
网络编程:Linux下高性能TCP网络服务器(代码完整版)多线程版本
linux·服务器·网络
Paranoid-up9 分钟前
安全启动和安全固件更新(SBSFU)10:双镜像机制 – 活动槽与下载槽的协同工作
安全·iap·安全启动·安全升级·sbsfu
微风凉凉起12 分钟前
复现漏洞 CVE-2026-31431
服务器
码云骑士18 分钟前
jwt入门介绍
linux·运维·数据库
XD74297163621 分钟前
科技早报晚报|2026年5月10日:Agent 安全沙箱、可审计编程代理与持久化产品上下文,今晚更值得做的 3 个开源机会
科技·安全·开源·开源项目·ai agent·开发者工具
@insist12323 分钟前
信息安全工程师-入侵阻断与网络流量清洗技术详解
网络·安全·软考·信息安全工程师·软件水平考试
小小测试开发25 分钟前
LLM 文档处理安全指南:如何避免 AI 静默篡改你的重要数据
人工智能·安全
vortex534 分钟前
无人机系统安全攻防技术深度解析
安全·系统安全·无人机
随身数智备忘录40 分钟前
设备档案模板详解:设备档案模板如何覆盖设备全生命周期信息?
服务器
灵晔君41 分钟前
【Linux】进程(一)
linux·运维·服务器