问题描述:

使用 SSH命令行 或者 xshell工具 连接内网服务器,卡在如下图状态很久才能连接上。

【Linux】ssh连接内网服务器速度缓慢

解决方法:

  • 登录所要连接的服务器后,打开并修改 /etc/ssh/sshd_config 文件:vim /etc/ssh/sshd_config

  1. 修改 GSSAPIAuthentication yes GSSAPIAuthentication no
  2. 修改 UseDNS yes UseDNS no(其中如果没有 UseDNS yes 这一行代码则在 UsePAM yes 代码后添加一行,如下图所示);

【Linux】ssh连接内网服务器速度缓慢

  • 重启sshd服务:service sshd restart
  • 查看服务状态:systemctl status sshd.service

【Linux】ssh连接内网服务器速度缓慢

此时再打开xshell,试着连接Linux,速度明显加快许多(几乎秒连)。

相关文章:

  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2021-07-02
  • 2021-11-09
  • 2022-02-24
  • 2021-12-05
  • 2021-12-05
猜你喜欢
  • 2022-03-06
  • 2021-08-24
  • 2022-12-23
  • 2021-09-04
  • 2022-03-01
相关资源
相似解决方案