linux中解决SSH连接慢问题 关键点GSSAPIAuthentication
[root@ok 6FE5-D831]# ssh -v xxx.xxx.xxx.64
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips Feb
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to xxx.xxx.xxx.64 [60.205.149.41] port .
debug1: Connection established.
debug1: permanently_set_uid: /
debug1: identity file /root/.ssh/identity type -
debug1: identity file /root/.ssh/identity-cert type -
debug1: identity file /root/.ssh/id_rsa type -
debug1: identity file /root/.ssh/id_rsa-cert type -
debug1: identity file /root/.ssh/id_dsa type -
debug1: identity file /root/.ssh/id_dsa-cert type -
debug1: identity file /root/.ssh/id_ecdsa type -
debug1: identity file /root/.ssh/id_ecdsa-cert type -
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.
debug1: match: OpenSSH_5. pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(<<) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '60.205.149.41' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic #卡在这里大该半分钟
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address debug1: Unspecified GSS failure. Minor code may provide more information debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel : new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env XMODIFIERS = @im=ibus
debug1: Sending env LANG = en_US.UTF- Welcome to aliyun Elastic Compute Service!
原来是因为尝试了个没有意义而且会失败的 gssapi-with-mic 认证方式浪费了时间,打开(本地主机“注意是本地主机---我用的是linux系统”) /etc/ssh/ssh_config 把里面的 GSSAPIAuthentication yes 改成 no 关掉它,即可让 ssh 直接尝试美妙的 publickey 认证方式。修改后,重启/etc/init.d/sshd服务
[root@GitLab ~]# exitdebug1: client_input_channel_req: channel rtype exit-status reply
debug1: client_input_channel_req: channel rtype eow@openssh.com reply logout
debug1: channel : free: client-session, nchannels
Connection to 10.100.2.84 closed.
Transferred: sent , received bytes, in 17.2 seconds
Bytes per second: sent 152.2, received 136.8
debug1: Exit status
[root@ok ssh]# time ssh -v 60.205.149.41 exit
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips Feb
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 60.205.149.41 [60.205.149.41] port .
debug1: Connection established.
debug1: permanently_set_uid: /
debug1: identity file /root/.ssh/identity type -
debug1: identity file /root/.ssh/identity-cert type -
debug1: identity file /root/.ssh/id_rsa type -
debug1: identity file /root/.ssh/id_rsa-cert type -
debug1: identity file /root/.ssh/id_dsa type -
debug1: identity file /root/.ssh/id_dsa-cert type -
debug1: identity file /root/.ssh/id_ecdsa type -
debug1: identity file /root/.ssh/id_ecdsa-cert type -
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.
debug1: match: OpenSSH_5. pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(<<) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '60.205.149.41' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel : new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env XMODIFIERS = @im=ibus
debug1: Sending env LANG = en_US.UTF-
debug1: Sending command: exit
debug1: client_input_channel_req: channel rtype exit-status reply
debug1: client_input_channel_req: channel rtype eow@openssh.com reply
debug1: channel : free: client-session, nchannels
Transferred: sent , received bytes, in 0.0 seconds
Bytes per second: sent 165567.7, received 157506.3
debug1: Exit status real 0m0.170s
user 0m0.021s
sys 0m0.009s
[root@ok ssh]# ssh -v 60.205.149.41
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips Feb
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 60.205.149.41 [60.205.149.41] port .
debug1: Connection established.
debug1: permanently_set_uid: /
debug1: identity file /root/.ssh/identity type -
debug1: identity file /root/.ssh/identity-cert type -
debug1: identity file /root/.ssh/id_rsa type -
debug1: identity file /root/.ssh/id_rsa-cert type -
debug1: identity file /root/.ssh/id_dsa type -
debug1: identity file /root/.ssh/id_dsa-cert type -
debug1: identity file /root/.ssh/id_ecdsa type -
debug1: identity file /root/.ssh/id_ecdsa-cert type -
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.
debug1: match: OpenSSH_5. pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(<<) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '60.205.149.41' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel : new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env XMODIFIERS = @im=ibus
debug1: Sending env LANG = en_US.UTF- Welcome to aliyun Elastic Compute Service!
linux中解决SSH连接慢问题 关键点GSSAPIAuthentication的更多相关文章
- Linux中解决SSH连接慢问题
[转载]来源:http://www.bkjia.com/xtzh/893669.html [转载原因]:其他文章都是修改服务器端配置,但为了保证服务器端安全问题,一般情况下最好不要修改服务器端配置.因 ...
- Putty等工具中解决SSH连接超时断开的问题
转自:http://www.putty.ws/putty-chaoshi 1 在 linux下的ssh命令:vim /etc/ssh/ssh_config 然后找到里面的ServerAliveInte ...
- linux:解决SSH连接Linux超时自动断开
用SSH登录到Linux的时候,由于默认的连接超时时间很短,经常断开! 1.修改文件 # vi /etc/ssh/sshd_config 2.重启sshd服务 # /etc/init.d/sshd r ...
- (转)CentOS/Linux 解决 SSH 连接慢
CentOS/Linux 解决 SSH 连接慢 原文:http://blog.csdn.net/doiido/article/details/43793391 现在连接linux服务器一般都是使用SS ...
- 转载: CentOS/Linux 解决 SSH 连接慢
CentOS/Linux 解决 SSH 连接慢 现在连接Linux服务器一般都是使用SSH远程连接的方式.最近新装了一台服务器,发现telnet时速度很快,ping时一切也正常,但SSH连接的时候却很 ...
- linux中的硬连接和软连接
linux中的硬连接和软连接 linux中的硬连接和软连接 背景 连接 硬连接 软连接 example reference 背景 linux中的文件主要分3块, - 真正的数据 - 索引节点号(ino ...
- CentOS/Linux 解决 SSH 连接慢
现在连接linux服务器一般都是使用SSH远程连接的方式.最近新装了一台服务器,发现telnet时速度很快,ping时一切也正常,但SSH连接的时候却很慢.经过网上资料查询,大致是有以下几种原因: 1 ...
- 解决SSH连接linux时长时间不操作自动断开
最近重装Linux系统,但是这次ssh连接云服务区Linux系统时,经常出现一段时间不操作,连接自动中断,表现为光标还在闪动,但是却无法操作.只好关闭终端,重新连接,很是麻烦. 为此,通过网络查找,找 ...
- Windows命令行中使用SSH连接Linux
转自 http://www.linuxidc.com/Linux/2014-02/96625.htm 1.下载: openssh for Winodws: 免费下载地址在 http://linux.l ...
随机推荐
- 日期的js插件DatePicker
官网:http://my97.net/dp/index.asp 百度网盘:http://pan.baidu.com/s/1c20y7uC 只显示月份 <input name="cost ...
- javax.swing.JList 设置分割线
public class TestJList extends JFrame { public TestJList() { JList list = new JList(new String[] { & ...
- 2016年10月27日--css样式表
CSS样式表 样式表分类 1.内联样式表 和html联合显示,控制精确,但是可重用性差,冗余多. !doctype html> <html> <head> <met ...
- 八数码问题:C++广度搜索实现
毕竟新手上路23333,有谬误还请指正. 课程设计遇到八数码问题(这也是一坨),也查过一些资料并不喜欢用类函数写感觉这样规模小些的问题没有必要,一开始用深度搜索却发现深搜会陷入无底洞,如果设定了深度限 ...
- 基于Selenium的模拟浏览器采集
Selenium 也是一个用于Web应用程序测试的工具.Selenium测试直接运行在浏览器中,就像真正的用户在操作一样.支持的浏览器包括IE(7.8.9).Mozilla Firefox.Mozil ...
- phpcms更换域名用户无法注册问题
问题背景: 用户注册必须在后台开启phpsso,这个sso也就是单点登录了,之前做的站都没有带用户登录,也一直没注意,今天线下localhost用户登录注册都没有问题,可是移到线上测试却怎么都无法注册 ...
- zaqar项目介绍
Zaqar is a multi-tenant cloud messaging and notification service for web and mobile developers. It c ...
- poj 2524 (并查集)
http://poj.org/problem?id=2524 题意:在一所学校里面的人,都有宗教信仰,不过他们的宗教信仰有可能相同有可能不同,但你又不能直接去问他们,但你可以问他们和谁是同一个宗教.通 ...
- 【转载】通过JDBC对MySQL数据库的增删改查
通过JDBC进行简单的增删改查(以MySQL为例) 目录 前言:什么是JDBC 一.准备工作(一):MySQL安装配置和基础学习 二.准备工作(二):下载数据库对应的jar包并导入 三.JDBC基本操 ...
- DP:Cow Exhibition(POJ 2184)(二维问题转01背包)
牛的展览会 题目大意:Bessie要选一些牛参加展览,这些牛有两个属性,funness和smartness,现在要你求出怎么选,可以使所有牛的smartness和funness的最大,并且这两 ...