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

相关推荐
Tony Bai8 分钟前
Go 安全新提案:runtime/secret 能否终结密钥残留的噩梦?
java·开发语言·jvm·安全·golang
大白菜132426 分钟前
进程的信号
linux
XH-hui28 分钟前
【打靶日记】群内靶机Secure
linux·网络安全
Shingmc31 小时前
【Linux】进程控制
linux·服务器·算法
视觉装置在笑7131 小时前
Shell 变量基础与进阶知识
linux·运维
Web极客码2 小时前
如何通过命令行工具检查 Linux 版本信息
linux·运维·服务器
欢鸽儿2 小时前
Vitis】Linux 下彻底清除启动界面 Recent Workspaces 历史路径
linux·嵌入式硬件·fpga
繁华似锦respect2 小时前
C++ 智能指针底层实现深度解析
linux·开发语言·c++·设计模式·代理模式
远程软件小帮手2 小时前
云电脑挂机功能上线!边上班摸鱼边游戏多开教程
运维·服务器
阿杰学AI2 小时前
AI核心知识38——大语言模型之Alignment(简洁且通俗易懂版)
人工智能·安全·ai·语言模型·aigc·ai对齐·alignment