SSH挂在“进入交互式会话”阶段

问题描述:

我用香蕉专业版的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

问题纯粹是偶然解决的,我不知道为什么。

正常情况下,在连接以太网电缆后,我一直在手动运行modprobe sunxi-gmac/etc/init.d/networking restart命令。 但是这次,不小心,我忘了插电缆,但在/etc/init.d/networking restart命令正在运行(发送发现阶段)时插入。 令我惊讶的是,ssh连接已经实现!这种行为是确定性的(足够尝试)。

任何人都可以解释这种奇怪的情况?为什么要在网络重启期间插入以太网电缆,而不是在此之前?