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

相关推荐
Honeyeagle5 分钟前
无线移动在线复合式多合一气体检测仪:工业安全监测的革新利器
运维·网络·安全
桌面运维家8 分钟前
网络运维:防火墙异常流量监控与安全配置优化
运维·网络·安全
x-cmd20 分钟前
[260326] x-cmd v0.8.10:跨 Shell 统一配置命令短名;自动装好依赖运行 WhisperLiveKit 实时语音转写
linux·人工智能·ai·whisper·shortcut·x-cmd
zhuyan10826 分钟前
【AI编程】aider安装记录
linux·运维·ai编程
书山有鹿1 小时前
MaxKB v2.7.0 Rocky Linux 9 部署手册
linux·运维·maxkb·rockylinux 9
Mapleay1 小时前
ALSA PCM 数据搬运模式
linux
Elastic 中国社区官方博客1 小时前
使用 ES|QL 变量控件将仪表板转变为调查工具
大数据·运维·服务器·数据库·elasticsearch·搜索引擎·全文检索
feng68_1 小时前
Ansible还原数据库节点
linux·运维·数据库·ansible
来鸟 鸣间1 小时前
oops问题定位记录
linux·c语言
softbangong1 小时前
816-批量将图片分别转为pdf,文件夹下所有图片转为一个pdf
java·服务器·pdf·图片处理·图片转pdf·pdf工具·批量转换