2014年8月26日 星期二

[linux] ubuntu ssh slow appear



ubuntu ssh slow appear

在 ubuntu 上使用ssh 指令時,常常要等一陣子。
可以在 ssh時 使用-vvv option列出debug message。

debug2: bits set: 528/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/peicheng/.ssh/id_rsa (0x7f81c3da6ef0)
debug2: key: /home/peicheng/.ssh/id_dsa ((nil))
debug2: key: /home/peicheng/.ssh/id_ecdsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/peicheng/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /home/peicheng/.ssh/id_dsa
debug3: no such identity: /home/peicheng/.ssh/id_dsa
debug1: Trying private key: /home/peicheng/.ssh/id_ecdsa
debug3: no such identity: /home/peicheng/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password


可能原因有 GSSAPIAuthentication,GSSAPIAuthentication fail 問題,
可以在 sudo vim /etc/ssh/ssh_config or ~/.ssh/config
加上
GSSAPIAuthentication no                                                                                          
GSSAPIDelegateCredentials no




Why ssh “password” prompt takes too long to appear? - Ask Ubuntu
http://askubuntu.com/questions/246323/why-ssh-password-prompt-takes-too-long-to-appear

沒有留言:

張貼留言