SSH to Jetson TX2 is not working

Hi at all,

i’m facing a problem when connecting through SSH to my Jetson TX2. I’m using an Ubuntu 18.04 and the board is correctly connected and visible from the host.

$ lsusb
Bus 002 Device 002: ID 8087:8002 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:800a Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 008: ID 0955:7020 NVidia Corp.
Bus 003 Device 005: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 003 Device 004: ID 413c:2107 Dell Computer Corp.
Bus 003 Device 003: ID abcd:1234 Unknown
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

when i launch the SSH command nothing happens until the system kill the command for connection timed out.

$ ssh jetson@192.168.55.1
ssh: connect to host 192.168.55.1 port 22: Connection timed out

The strange thing is that if i connect my Jetson to another laptop (using a MacBook Pro with Ubuntu via VM) the board is visible and reachable via SSH. So i think that the problem is in my host pc.

I have to add that before adding the ethernet connection protected by 801.x in my host side all was working correctly, maybe this is the cause? And if yes how can i fix it?

Here some debug commands that could be useful (from my Jetson)

$ifconfig

Summary
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 147.122.61.40  netmask 255.255.255.0  broadcast 147.122.61.255
        inet6 fe80::3323:15e2:81ca:9ea2  prefixlen 64  scopeid 0x20<link>
        ether 00:04:4b:8c:a0:d1  txqueuelen 1000  (Ethernet)
        RX packets 31488  bytes 29457041 (29.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9157  bytes 1135103 (1.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 41  

l4tbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.55.1  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        inet6 fe80::4064:c3ff:fe7e:85f5  prefixlen 64  scopeid 0x20<link>
        ether 42:64:c3:7e:85:f5  txqueuelen 1000  (Ethernet)
        RX packets 368  bytes 70435 (70.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 850  bytes 89726 (89.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 6223  bytes 383017 (383.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6223  bytes 383017 (383.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::4064:c3ff:fe7e:85f5  prefixlen 64  scopeid 0x20<link>
        ether 42:64:c3:7e:85:f5  txqueuelen 1000  (Ethernet)
        RX packets 92  bytes 18322 (18.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 700  bytes 110027 (110.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::4064:c3ff:fe7e:85f7  prefixlen 64  scopeid 0x20<link>
        ether 42:64:c3:7e:85:f7  txqueuelen 1000  (Ethernet)
        RX packets 281  bytes 53270 (53.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 674  bytes 109412 (109.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:04:4b:8c:a0:cf  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 ● ssh.service - OpenBSD Secure Shell server
       Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
       Active: active (running) since Wed 2020-10-14 11:35:12 CEST; 27min ago
       Process: 12888 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
       Process: 12883 ExecReload=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
       Process: 5070 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
       Main PID: 5171 (sshd)
       Tasks: 1 (limit: 4915)
       CGroup: /system.slice/ssh.service
       └─5171 /usr/sbin/sshd -D

ott 14 11:57:48 jetson-tx2-board systemd[1]: Reloading OpenBSD Secure Shell server.
ott 14 11:57:48 jetson-tx2-board sshd[5171]: Received SIGHUP; restarting.
ott 14 11:57:48 jetson-tx2-board systemd[1]: Reloaded OpenBSD Secure Shell server.
ott 14 11:57:48 jetson-tx2-board sshd[5171]: Server listening on 0.0.0.0 port 22.
ott 14 11:57:48 jetson-tx2-board sshd[5171]: Server listening on :: port 22.
ott 14 11:57:49 jetson-tx2-board systemd[1]: Reloading OpenBSD Secure Shell server.
ott 14 11:57:49 jetson-tx2-board systemd[1]: Reloaded OpenBSD Secure Shell server.
ott 14 11:57:49 jetson-tx2-board sshd[5171]: Received SIGHUP; restarting.
ott 14 11:57:49 jetson-tx2-board sshd[5171]: Server listening on 0.0.0.0 port 22.
ott 14 11:57:49 jetson-tx2-board sshd[5171]: Server listening on :: port 22.

Did you have USB connection between host pc and Jetson TX2?

“192.168.55.1” is dedicated USB-Eth when you connect your Jetson TX2 through USB cable to host pc.

Did you have USB connection between host pc and Jetson TX2?
“192.168.55.1” is dedicated USB-Eth when you connect your Jetson TX2 through USB cable to host pc.

Yes, the Jetson TX2 is connected through the USB cable to my host machine

Then, how about disconnect all other Ethernet cables from your host?

Then, how about disconnect all other Ethernet cables from your host?

I got this error:

$ ssh 192.168.55.1
ssh: connect to host 192.168.55.1 port 22: Network is unreachable

Perhaps the host side just didn’t allow the port to be used without you enabling it.

With the USB connected to the host PC, what do you see from the following on the host PC side?

  • ifconfig
  • route

If you monitor “dmesg --follow”, and then connect the USB, you should notice a MAC address in the log. If you run “sudo nm-connection-editor” (you might need to “sudo apt-get install network-manager-gnome”), does it show that MAC active? FYI, there are other ways to set up networking other than nm-connection-editor, but that is my favorite.

If the connection works from any other computer to the Jetson, then when it fails, it is very likely a setup issue on the other computer which the Jetson itself won’t have any ability to fix.

Here the results:

$ ifconfig

Summary
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 147.122.61.163  netmask 255.255.255.0  broadcast 147.122.61.255
        inet6 fe80::40f1:61b9:630c:f8e  prefixlen 64  scopeid 0x20<link>
        ether 18:66:da:34:f8:bd  txqueuelen 1000  (Ethernet)
        RX packets 16113  bytes 16030059 (16.0 MB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 7575  bytes 1049584 (1.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf7100000-f7120000  

enp0s20u7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 42:fc:89:4f:5f:f0  txqueuelen 1000  (Ethernet)
        RX packets 76  bytes 9610 (9.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s20u7i5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 42:64:c3:7e:85:f6  txqueuelen 1000  (Ethernet)
        RX packets 78  bytes 9802 (9.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1021  bytes 86641 (86.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1021  bytes 86641 (86.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    101    0        0 enp0s25
147.122.61.0    0.0.0.0         255.255.255.0   U     101    0        0 enp0s25
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 enp0s25

The output of $demsg --follow when i connect the device is this:

[  751.201919] usb-storage 3-7:1.4: USB Mass Storage device detected
[  751.202108] scsi host10: usb-storage 3-7:1.4
[  751.221686] cdc_ncm 3-7:1.5: MAC-Address: 42:64:c3:7e:85:f6
[  751.221952] cdc_ncm 3-7:1.5 usb1: register 'cdc_ncm' at usb-0000:00:14.0-7, CDC NCM, 42:64:c3:7e:85:f6
[  751.239243] cdc_ncm 3-7:1.5 enp0s20u7i5: renamed from usb1
[  751.263188] rndis_host 3-7:1.0 enp0s20u7: renamed from usb0
[  751.371279] cdc_ncm 3-7:1.5 enp0s20u7i5: 425 mbit/s downlink 425 mbit/s uplink
[  751.403247] cdc_ncm 3-7:1.5 enp0s20u7i5: 425 mbit/s downlink 425 mbit/s uplink
[  751.435290] cdc_ncm 3-7:1.5 enp0s20u7i5: network connection: connected
[  751.435348] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s20u7i5: link becomes ready
[  752.229610] scsi 10:0:0:0: Direct-Access     Linux    File-Stor Gadget 0409 PQ: 0 ANSI: 2
[  752.229994] sd 10:0:0:0: Attached scsi generic sg4 type 0
[  752.230210] sd 10:0:0:0: Power-on or device reset occurred
[  752.254026] sd 10:0:0:0: [sdd] Attached SCSI removable disk

But when i execute the nn-connection-editor i have only the ethernet profile connection

This is the MAC address:

I assume this is only a typographic error, but the program name is actually “nm-connection-editor”:

Your route content suggests the host has no route to the 192.168.55.1 address. The ifconfig output shows MAC address 42:64:c3:7e:85:f6 goes with interface name:
enp0s20u7i5
…but is not assigned an address. This tends to reinforce the idea that the host sees the interface, but is disabling it and not allowing it to be used. The address assignment would occur if a DHCP request went out on enp0s20u7i5, and the lack of this tends to be a host side setting (there was no request, so the Jetson cannot respond to the request).

There are other ways to do this, but if you are running “sudo nm-connection-editor”, note that there is a “+” at the bottom left for adding interfaces. If you have “Ethernet” highlighted above, then click “+”, can you find and create an interface associated with MAC address 42:64:c3:7e:85:f6?

Oh great! It’s working now.

I opened the network connections manager and i manually added the mac address of the Jetson, now i’m able to connect through SSH to it.

Many thanks!