在使用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插件自动生成