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

相关推荐
idolao41 分钟前
CentOS 7 安装 nginx-1.3.15.tar.gz 详细步骤(从源码编译到启动配置)
linux·运维·数据库
@encryption42 分钟前
TCP,IP
服务器·网络·tcp/ip
EnCi Zheng1 小时前
J7A-已有数据表如何安全添加新字段 [特殊字符]️
数据库·安全·oracle
yaoxin5211231 小时前
358. Java IO API - 使用 relativize() 创建路径之间的相对关系
java·linux·python
SuperEugene1 小时前
前端 console 日志规范实战:高效调试 / 垃圾 log 清理与线上安全避坑|编码语法规范篇
开发语言·前端·javascript·vue.js·安全
亚林瓜子1 小时前
linux账号强制密码过期导致私钥文件登录异常问题——(current) UNIX password:
linux·运维·服务器·ssh·aws·ec2·chage
柯儿的天空1 小时前
【OpenClaw 全面解析:从零到精通】第 013 篇:OpenClaw 安全机制深度解析——沙盒隔离、权限控制与安全最佳实践
人工智能·安全·ai作画·aigc·ai写作
Code_LT1 小时前
【AIGC】Claude Code Rules配置
linux·ubuntu·aigc
LXY_BUAA1 小时前
《嵌入式操作系统》_驱动框架_20260318
linux·运维·服务器
淮北也生橘121 小时前
Linux应用开发:全链路 OTA 升级架构
linux·架构·ota·linux应用开发