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

相关推荐
zfxwasaboy2 小时前
Linux宏clamp(val, lo, hi)的作用
linux·运维·服务器
再不会python就不礼貌了2 小时前
从工具到个人助理——AI Agent的原理、演进与安全风险
人工智能·安全·ai·大模型·transformer·ai编程
我爱学习好爱好爱4 小时前
Ansible 常用模块详解:lineinfile、replace、get_url实战
linux·python·ansible
吴声子夜歌5 小时前
TypeScript——基础类型(三)
java·linux·typescript
Chengbei115 小时前
推送POC汇总 — 2026年1月多产品多类型vulnerability速递与应急建议
安全·web安全·网络安全·系统安全·网络攻击模型·安全架构
DA02215 小时前
系统移植-STM32MP1启动详解(BootROM)
linux·bsp·系统移植
春日见5 小时前
自驾算法的日常工作?如何提升模型性能?
linux·人工智能·机器学习·计算机视觉·自动驾驶
李彦亮老师(本人)6 小时前
【Linux系统】Rocky Linux 9.7操作系统简介
linux·运维·服务器·docker·kubernetes
freewlt6 小时前
深入理解 OpenClaw:打造安全可控的本地 AI 助理架构
人工智能·安全·架构·openclaw
minji...6 小时前
Linux 进程信号(二)信号的保存,sigset_t,sigprocmask,sigpending
linux·运维·服务器·网络·数据结构·c++·算法