2016-04-21 63 views
1

我用香蕉專業版的yocto項目構建了一個圖像。我試圖通過ssh [email protected]連接端口,但我不能。SSH掛在「進入交互式會話」階段

Ssh總是掛在Entering interactive session階段。當我運行ssh -v參數,我捕捉到下面的日誌:

OpenSSH_6.9p1 Ubuntu-2ubuntu0.1, OpenSSL 1.0.2d 9 Jul 2015 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: /etc/ssh/ssh_config line 19: Applying options for * 
debug1: Connecting to 10.1.80.41 [10.1.80.41] port 22. 
debug1: Connection established. 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/yusuf/.ssh/id_rsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/yusuf/.ssh/id_rsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/yusuf/.ssh/id_dsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/yusuf/.ssh/id_dsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/yusuf/.ssh/id_ecdsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/yusuf/.ssh/id_ecdsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/yusuf/.ssh/id_ed25519 type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/yusuf/.ssh/id_ed25519-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_6.9p1 Ubuntu-2ubuntu0.1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.1 
debug1: match: OpenSSH_7.1 pat OpenSSH* compat 0x04000000 
debug1: Authenticating to 10.1.80.41:22 as 'root' 
debug1: SSH2_MSG_KEXINIT sent    
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: server->client [email protected] none 
debug1: kex: client->server [email protected] none 
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY 
debug1: Server host key: ecdsa-sha2-nistp256 
SHA256:XpqS0ZXhoF/OsBmiD8bkpWaZ6Fbk5T3a2Xdq2E8127w 
The authenticity of host '10.1.80.41 (10.1.80.41)' can't be established. ECDSA key 
fingerprint is SHA256:XpqS0ZXhoF/OsBmiD8bkpWaZ6Fbk5T3a2Xdq2E8127w. Are 
you sure you want to continue connecting (yes/no)? yes 
Warning: 
Permanently added '10.1.80.41' (ECDSA) to the list of known hosts. 
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: Authentication succeeded (none). Authenticated to 10.1.80.41 ([10.1.80.41]:22). 
debug1: channel 0: new [client-session] 
debug1: Requesting [email protected] 
debug1: Entering interactive session. 

我試圖改變MTU,但沒有奏效。

我該如何解決這個問題?

+0

請編輯您的問題以包含您正在運行的產生此結果的實際ssh命令。 – Kenster

+0

請問,除了提供實際的命令之外,還可以確保在日誌中有換行符嗎?目前,它非常難以閱讀。 – Anders

+0

我編輯了我的問題。我運行「ssh [email protected]」命令 – overlord

回答

0

問題純粹是偶然解決的,我不知道爲什麼。

正常情況下,在連接以太網電纜後,我一直在手動運行modprobe sunxi-gmac/etc/init.d/networking restart命令。 但是這次,不小心,我忘了插電纜,但在/etc/init.d/networking restart命令正在運行(發送發現階段)時插入。 令我驚訝的是,ssh連接已經實現!這種行爲是確定性的(足夠嘗試)。

任何人都可以解釋這種奇怪的情況?爲什麼要在網絡重啓期間插入以太網電纜,而不是在此之前?