总结sshd服务常用参数


服务器端的配置文件: /etc/ssh/sshd_config

常用参数:
Port                                                 #端口号
ListenAddress ipLoginGraceTime 2m                    #宽限期
PermitRootLogin yes                                  #默认ubuntu不允许root远程ssh登录
StrictModes yes                                      #检查.ssh/文件的所有者,权限等
MaxAuthTries   6     
MaxSessions  10                                     #同一个连接最大会话
PubkeyAuthentication yes                             #基于key验证
PermitEmptyPasswords no                              #空密码连接
PasswordAuthentication yes                          #基于用户名和密码连接
GatewayPorts no
ClientAliveInterval 10                                #单位:秒
ClientAliveCountMax 3                                 #默认3
UseDNS yes                                            #提高速度可改为no
GSSAPIAuthentication yes                              #提高速度可改为no
MaxStartups                                           #未认证连接最大值,默认值10
Banner /path/file                                     #登录提示信息
#以下可以限制可登录用户的办法:
AllowUsers user1 user2 user3
DenyUsers
AllowGroups

 

posted @   小糊涂90  阅读(90)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示