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

相关推荐
做萤石二次开发的哈哈9 分钟前
萤石×广联达 | 智能视觉融合数字建造,让工地更透明、更安全
人工智能·安全·音视频·智能硬件
花间相见15 分钟前
【Ubuntu实用工具】—— 高颜值实用ls命令工具lsd
linux·运维·ubuntu
gergul19 分钟前
python venv虚拟环境复制
linux·开发语言·python
the sun3425 分钟前
共享文件夹设置:让Windows和Ubuntu能方便的传输文件
linux·windows·ubuntu
虎头金猫28 分钟前
监控机不在被监控的机器上,Prometheus怎么跨网络把数据拉过来
运维·服务器·开发语言·网络·云原生·开源·prometheus
dingdingfish34 分钟前
TLPI 第17章 练习:Access Control Lists
linux·tlpi·exercise
枳实-叶43 分钟前
【Linux驱动开发】第5天:字符设备驱动核心原理:主次设备号+cdev+数据拷贝全解
linux·运维·驱动开发
weixin_514253181 小时前
507-opencua tmux
安全
七夜zippoe1 小时前
OpenClaw memory_search:语义搜索实战
服务器·网络·memory·语义搜索·openclaw
南境十里·墨染春水1 小时前
linux 学习进展 网络编程 ——HTTP 协议详解
linux·网络·学习