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

相关推荐
想唱rap17 分钟前
Linux线程
java·linux·运维·服务器·开发语言·mysql
JFSJFX34 分钟前
手机短信误删怎么办?这4种恢复办法亲测有效,轻松找回短信
运维·服务器
聊点儿技术41 分钟前
利用IP归属地查询识别异地登录风险:企业账号安全的技术探索
数据库·tcp/ip·安全
cccccc语言我来了1 小时前
Linux(9)操作系统
android·java·linux
Lueeee.1 小时前
Linux驱动中为什么既有 sysfs,又有字符设备?以 DHT11 驱动为例彻底讲透
linux·驱动开发
xlp666hub2 小时前
深度剖析Linux Input子系统(2):驱动开发流程与现代 Multi-touch 协议
linux
AI-Ming2 小时前
程序员转行学习 AI 大模型: 踩坑记录:服务器内存不够,程序被killed
服务器·人工智能·python·gpt·深度学习·学习·agi
路由侠内网穿透2 小时前
本地部署开源工作空间工具 AFFiNE 并实现外部访问
运维·服务器·数据库·物联网·开源
zzzsde2 小时前
【Linux】Ext文件系统(1)
linux·运维·服务器
爱学习的小囧2 小时前
ESXi 8.0 无法选择分区方式 小白级详细解决办法
运维·服务器·网络·虚拟化·esxi8.0