ssh安全调优参数

配置文件在/etc/ssh/sshd_config中

参数详解

LoginGraceTime 2m

在多久时间内没有成功连上 SSH server 就强迫断线!若无单位则默认时间为秒!

PermitRootLogin yes

是否允许 root 登入!

PasswordAuthentication yes

是否开启密码验证

 PermitEmptyPasswords no 

是否允许空密码登陆

 PrintMotd yes 

打印登陆信息,比如上次登陆时间和地点,打印/etc/motd内容

PrintLastLog yes 

显示上次登陆的信息

UseDNS yes

一般来说,为了要判断客户端来源是正常合法的,因此会使用 DNS 去反查客户端的主机名,不过如果是在内网互连,这项目设定为 no 会让联机速度比较快。

发表评论

后才能评论