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: Unable to SSH into TI AM5728

Part Number: AM5728

Hi,

I have a custom board based on TI AM5728 EVM. I am using TI LINUX PSDK 6.03 on it.

I am facing the following issue on the board - 

I have connected the board to ethernet (LAN) on eth0 port. Say, after the first reboot, I have provided it with the IP address, netmask, and gateway. I am able to PING the IP address of the board. I am also able to SSH (remote-login) into the board. Now suppose I rebooted the board, there is a 50-50% chance that SSH will stop working. That is, the board will have the same IP, netmask, and gateway and the PING will also work but SSH will not work.

This may happen just after the second reboot or after the 'N' number of reboots. It is not fixed and also not reproducible after a fixed interval. But after several reboots, there will be one time when SSH will stop working but PING will work until I reboot again. The only solution to this issue is to reboot again and again till SSH starts working.

So I decided to take some observations when I hit the problem (PING working but SSH not working). 

1. ifconfig & route table snapshot - looks OK to me

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@am57xx-evm:~# ifconfig
eth0 Link encap:Ethernet HWaddr D0:03:EB:6C:50:36
inet addr:192.168.8.97 Bcast:192.168.8.255 Mask:255.255.255.0
inet6 addr: fe80::d203:ebff:fe6c:5036/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:201188 errors:0 dropped:3032 overruns:0 frame:0
TX packets:816 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18021841 (17.1 MiB) TX bytes:249325 (243.4 KiB)
Interrupt:91
eth1 Link encap:Ethernet HWaddr D0:03:EB:6C:50:37
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

2. Dropbear service status - 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
root@am57xx-evm:~# ps -ef | grep dropbear
root 1686 1088 0 01:36 ttyS2 00:00:00 grep dropbear
root@am57xx-evm:~#
root@am57xx-evm:~# fuser 22/tcp
root@am57xx-evm:~#
root@am57xx-evm:~# systemctl is-active dropbear
inactive
root@am57xx-evm:~#
root@am57xx-evm:~# systemctl status dropbear.service
�● dropbear.service - LSB: Dropbear Secure Shell server
Loaded: loaded (/etc/init.d/dropbear; generated)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

3. When I try SSH into the board from a client - 

It gets stuck after "Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.4"

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@darsh-pc:/home/darsh# ssh -vvvvvvv root@192.168.8.97
OpenSSH_8.2p1 Ubuntu-4ubuntu0.4, OpenSSL 1.1.1f 31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.8.97 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.8.97 [192.168.8.97] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa_sk type -1
debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: identity file /root/.ssh/id_ed25519_sk type -1
debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The client (the laptop) here is waiting for the server (the board) to send its version string to the client. The connection hangs here because the client hasn't received the version string from the server.

If at this time I check logs on the server (the board), I get the following - 

Fullscreen
1
2
3
4
5
6
7
8
9
root@am57xx-evm:~# ps -ef | grep drop
root 1703 1 0 01:41 ? 00:00:00 /usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -B
root 1705 1088 0 01:42 ttyS2 00:00:00 grep drop
root@am57xx-evm:~# journalctl -f
Mar 17 01:42:12 am57xx-evm dropbear[1703]: Exit before auth: Exited normally
Mar 17 01:42:13 am57xx-evm systemd[1]: Started SSH Per-Connection Server (192.168.8.191:34614).
Mar 17 01:42:13 am57xx-evm dropbear[1708]: Child connection from ::ffff:192.168.8.191:34614
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I don't understand what is causing this issue. Also why this issue is intermittent. 

How can I resolve this?

Kindly acknowledge and revert.

Regards,

Devashish