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

相关推荐
爱奥尼欧33 分钟前
【Linux】网络部分——Socket编程 UDP实现网络云服务器与本地虚拟机的基本通信
linux·服务器·网络
Ching·33 分钟前
RK3568入门之VScode远程连接开发板,直接开发板上面编程和实验
linux·ide·vscode·编辑器·rk3568
iconball1 小时前
个人用云计算学习笔记 --20 (Nginx 服务器)
linux·运维·笔记·学习·云计算
Wang's Blog1 小时前
Linux小课堂: 在 VirtualBox 虚拟机中安装 CentOS 7 的完整流程与关键技术详解
linux·运维
liu****1 小时前
基于websocket的多用户网页五子棋(九)
服务器·网络·数据库·c++·websocket·网络协议·个人开发
liu****1 小时前
基于websocket的多用户网页五子棋(八)
服务器·前端·javascript·数据库·c++·websocket·个人开发
馨谙2 小时前
Linux中权限系统
linux·运维·服务器
jieyu11192 小时前
虚拟专用网络
linux·网络
报错小能手2 小时前
linux学习笔记(19)进程间通讯——消息队列
linux·笔记·学习
szxinmai主板定制专家3 小时前
一种基于 RK3568+AI 的国产化充电桩安全智能交互终端的设计与实现,终端支持各种复杂的交互功能和实时数据处理需求
arm开发·人工智能·嵌入式硬件·安全