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

相关推荐
峥嵘life4 分钟前
Android16 【CTS】CtsWindowManagerDeviceAnimations存在fail项
android·linux·学习
aiAIman24 分钟前
OpenClaw 2026.3.12+ 外网访问云服务器完全指南
运维·服务器·开源·aigc
VermouthSp24 分钟前
上下文切换
linux·rust
我爱学习好爱好爱2 小时前
Logstash 数据管道测试案例:从 Filebeat 接收日志并输出至黑屏幕与 Elasticsearch(基于Rocky Linux 9.6)
大数据·linux·elasticsearch
桌面运维家2 小时前
Windows VHD虚拟磁盘技术详解与应用指南
linux·运维·服务器
hy____1232 小时前
Linux_网络基础2
linux·服务器·网络
微露清风2 小时前
系统性学习Linux-第六讲-Ext文件系统
linux·服务器·学习
喵叔哟2 小时前
6. 【Blazor全栈开发实战指南】--组件通信与共享状态
linux·网络·windows
桌面运维家3 小时前
云桌面vDisk解决方案:Windows/Linux高效部署与优化
linux·运维·服务器
wsoz3 小时前
GCC编译
linux·c语言·嵌入式·gcc