# 修改配置文件, 先备份
[root@localhost ~]# cp /etc/ssh/sshd_config /tmp/
[root@localhost ~]# vi /etc/ssh/sshd_config
# 直接输入:79回车
79 GSSAPIAuthentication no
115 UseDNS no
输入:wq保存退出
# 重启sshd服务
[root@localhost ~]# systemctl restart sshd
# 如果修改失败, 还原配置文件
[root@localhost ~]# cp /tmp/sshd_config /ect/ssh/sshd_config
[root@localhost ~]# systemctl restart sshd
优化Linux系统ssh登陆速度
![](https://img-home.csdnimg.cn/images/20240711042549.png)