在使用SecureCRT、SecureFX、Putty连接Linux时,出现窗口显示已连接,但命令行迟迟不出现的情况。这个问题肯定让人十分恼火,尤其在时间紧迫的时候更是让人忍无可忍。我也有了这种痛苦的经历,所以把问题的解决方法分享给大家。
问题原因:其实问题就出在DNS解析IP上
解决方法:
1、vim /etc/ssh/sshd_config
进入文件vim /etc/ssh/sshd_config中,添加 UseDNS no,之后保存退出。
2、重启ssh服务
CentOS 7上使用命令:
systemctl restart sshd.service
CentOS 6上使用命令:
service sshd restart
3、如果问题没有解决,可以再次编辑vim /etc/ssh/sshd_config ,查找到
# GSSAPI options
GSSAPIAuthentication no ,去掉#将注释消除,保存退出。
4、使用步骤2中的命令,重启ssh服务。使用SecureCRT再次连接,不用等待直接起飞。
本文配图:
文章的脚注信息由WordPress的wp-posturl插件自动生成

微信扫一扫,打赏作者吧~![[已解决]nc命令报错 close: Bad file descriptor](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2022/03/Snipaste_2022-03-18_20-16-48.png&w=280&h=210&zc=1)
![[转载]Linux的tickless设置](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.litrin.net/wp-content/uploads/2018/11/kernel_menuconfig_tickless-1.png&w=280&h=210&zc=1)
![[整理]鲲鹏性能优化十板斧(五)——应用程序性能调优<TaiShan特战队出品>](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=http://www.jyguagua.com/wp-content/uploads/2020/03/1-4.jpg&w=280&h=210&zc=1)
![[整理]鲲鹏性能优化十板斧(四)——磁盘IO子系统性能调优<TaiShan特战队出品>](http://www.jyguagua.com/wp-content/themes/begin/timthumb.php?src=https://bbs-img.huaweicloud.com/blogs/img/1572357064241058.png&w=280&h=210&zc=1)