--- layout: post cid: 342 title: centos7 ssh连接慢的解决方法 slug: solution-to-slow-ssh-connection-of-centos-7 date: 2022/08/12 16:52:00 updated: 2022/08/12 16:55:00 status: publish author: 老孙 categories: 分享 tags: - centos dtMode: 0 radioPostImg: none abbrlink: 58592 excerpt: 'ai: 这篇文章介绍了如何通过编辑配置文件来优化SSH服务的设置。具体步骤包括禁用DNS解析和GSSAPI认证,并展示了如何保存更改并重启服务以使设置生效。' icon: thumbnail: --- ```bash vim /etc/ssh/sshd_config ``` 按i编辑插入 找到 `UseDNS`去掉前面的#号 改为 no `GSSAPIAuthentication` 改为 no 然后`:wq `保存退出 ```bash systemctl restart sshd ``` 重启