ssh配置文件安全设置

1.在/etc/ssh/sshd_config中设置空闲超时值为200秒
2.在/etc/ssh/sshd_config中禁用空密码
3.在SSH配置文件(/etc/ssh/sshd_config)中禁用X11(图形服务器)转发功能,Shell访问不需要
4.将 Max Authentication Tries 调整为 /etc/ssh/sshd_config 中的较低值,因此攻击者在尝试使用失败的密码访问 SSH 时可以尝试较低的时间。
5.在 /etc/ssh/sshd_config 中将 SSH 端口更改为自定义端口
6.在 /etc/host.conf 中启用服务器欺骗保护
7.启用服务器防火墙并允许主要端口的传入连接
8.在 /etc/ssh/sshd_config 中将活动客户端间隔设置为较低的值,以保护未经授权的 SSH 连接
9.在 /etc/ssh/sshd_config中禁止对本地用户的 root 登录和密码认证。允许“本地用户”作为安全用户通过 SSH 访问服务器。
10. 启用与本地用户的无密码连接。(免密登录)

posted @ 2024-08-19 19:43  学不会xuebuhui  阅读(2)  评论(0编辑  收藏  举报
Language: javascript