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

相关推荐
岭锅锅1 小时前
机房U位资产管理系统:让设备管理更高效
服务器
k***92161 小时前
【Linux】进程概念(五):详解环境变量的本质
linux·运维·服务器
世转神风-1 小时前
VMware-挂载报错:no mountpoint specified
linux
KakiNakajima2 小时前
CentOS 7 x86系统安装EMQX 【kaki备忘录】
linux·运维·centos
ALex_zry2 小时前
C++20和C++23 在内存管理、并发控制和类型安全相关优化方式的详细技术分析
安全·c++20·c++23
是喵斯特ya2 小时前
数据库的权限提升
数据库·安全
敢敢のwings2 小时前
云服务器上部署Dify完整教程
运维·服务器
少年、潜行3 小时前
F1C100/200S学习笔记(1)-- 核心板和验证板硬件设计
linux·驱动开发·f1c200s
东木君_3 小时前
Linux 驱动框架中 Class 机制完整讲解(以 ov13855 摄像头为例)
linux
yiSty3 小时前
linux命令行下使用百度云网盘【自用】
linux·运维·百度云