This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: AM5728: SSH Issue

Part Number: AM5728

Hello ,

I have ported sshd on the custom board as you suggested. However, I am still facing this issue every now and then.

In addition to the observations in the related thread, following are my new observations -

1. I have tried to eliminate the rest of the network by directly connecting the board with a pc via a cable, then setting static IP. However, when the issue comes, this test case also does not work.

2. When ssh fails for ping works, even restarting the sshd doesn't help.

3. I tried changing the MTU on both client and server as suggested on many open source forums, but still, it doesn't work.

4. I tried removing all the crypto modules (rmmod cryptodev.ko, cryptd.ko, crypto_engine.ko, omap_aes.ko, omap_des.ko, omap_sham.ko) and restarting sshd but still, it doesn't work.

5. Another important observation when ssh fails and ping works, ping only works for packets of smaller size (maximum 118 bytes) and nothing beyond this.

I am attaching the logs on client (192.168.21.28) AM5728 based custom board and server(192.168.21.26) PC-

ON SERVER -

(stuck on "SSH2_MSG_KEXINIT sent" )

root@dti7de14-014:/home/user# ssh -vvv root@192.168.21.28
OpenSSH_7.6p1 Ubuntu-4ubuntu0.6, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "192.168.21.28" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.21.28 [192.168.21.28] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9
debug1: match: OpenSSH_7.9 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.21.28:22 as 'root'
debug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:6
debug3: load_hostkeys: loaded 1 keys from 192.168.21.28
debug3: hostkeys_foreach: reading file "/etc/ssh/ssh_known_hosts"
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent

ON CLIENT -

(stuck on "expecting SSH2_MSG_KEX_ECDH_INIT [preauth]" )

root@am57xx-evm:/tmp# cat a.log 
debug1: Forked child 9392.
debug1: Set /proc/self/oom_score_adj to 0
debug1: rexec start in 6 out 6 newsock 6 pipe 8 sock 9
debug1: inetd sockets after dupping: 5, 5
Connection from 192.168.21.26 port 44364 on 192.168.21.28 port 22
debug1: Client protocol version 2.0; client software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.6
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.6 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: permanently_set_uid: 1002/1002 [preauth]
debug1: list_hostkey_types: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: algorithm: curve25519-sha256 [preauth]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256 [preauth]
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none [preauth]
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none [preauth]
debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]

The resolution of this problem is very critical to our product.

Kindly acknowledge.

Regards,

Devashish