SSH enabled only if connected through microUSB

Hello,
I have Jetson Nano and my laptop connected to my Android phone as hotspot. I can see the Jetson’s IP in my phone, but I cannot connect using an SSH client from either my phone (Juice SSH) or my laptop (Ubuntu). However, if I connect my laptop to the Jetson microUSB port, and login, then I can connect using SSH from both devices, and the connection is maintained even if I disconnect my laptop from the microUSB port, but I cannot login again using SSH until the I connect it again!

I would very much like to have Jetson accept SSH connections once booted, with no need to connect my laptop to the microUSB port.

Regards.

This sounds like your android phone is not able to create a environment to let your laptop and jetson to ping each other.

Not an issue on jetson itself.

I have reproduced it using my home WiFi. Jetson has address 192.168.100.170 and my laptop has address 192.168.100.4. Now, if I try to SSH to Jetson without any cable connection, I get

$ ssh 192.168.100.170
ssh: connect to host 192.168.100.170 port 22: No route to host
$

Same if I just connect the USB cable. However, if I login to Jetson using

$ sudo screen /dev/ttyACM0 115200`

then I can ssh to 192.168.100.170 from another terminal window, and from other computers, and my phone, as long as I am connected through the USB cable.

Once the connection through the USB cable finish, existing SSH sessions remain active, but I cannot establish a new one.

I hope I have explained it well enough.

Regards.

Can you use uart console or console on the HDMI monitor to access your board when no usb cable connected and share us the ifconfig?

I ran ifconfig with nohup and after 30 seconds after logout and disconnecting the USB cable:


docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:3d:54:7f:d7  txqueuelen 0  (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

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 48:b0:2d:2e:5e:c4  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
        device interrupt 149  base 0xe000  

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 2870  bytes 217915 (217.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2870  bytes 217915 (217.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::389c:21ff:fee5:4379  prefixlen 64  scopeid 0x20<link>
        ether 3a:9c:21:e5:43:79  txqueuelen 1000  (Ethernet)
        RX packets 1874  bytes 334868 (334.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 667  bytes 158168 (158.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::389c:21ff:fee5:437b  prefixlen 64  scopeid 0x20<link>
        ether 3a:9c:21:e5:43:7b  txqueuelen 1000  (Ethernet)
        RX packets 12615  bytes 1120539 (1.1 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9908  bytes 56668820 (56.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:e0:4c:49:c6:a0  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 11852895 (11.8 MB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 0  bytes 318064 (318.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Can you share it under the scenario that you have the wifi connected to the AP?

Here it is:

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:93:dc:f0:87  txqueuelen 0  (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

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 48:b0:2d:2e:5e:c4  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
        device interrupt 149  base 0x6000

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::389c:21ff:fee5:4379  prefixlen 64  scopeid 0x20<link>
        ether 3a:9c:21:e5:43:79  txqueuelen 1000  (Ethernet)
        RX packets 89  bytes 14143 (14.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 95  bytes 11214 (11.2 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 355  bytes 26592 (26.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 355  bytes 26592 (26.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::389c:21ff:fee5:4379  prefixlen 64  scopeid 0x20<link>
        ether 3a:9c:21:e5:43:79  txqueuelen 1000  (Ethernet)
        RX packets 85  bytes 13516 (13.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 128  bytes 22431 (22.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::389c:21ff:fee5:437b  prefixlen 64  scopeid 0x20<link>
        ether 3a:9c:21:e5:43:7b  txqueuelen 1000  (Ethernet)
        RX packets 43  bytes 7485 (7.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 61  bytes 12232 (12.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.170  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 2806:2f0:5001:2f90::a  prefixlen 128  scopeid 0x0<global>
        inet6 2806:2f0:5001:2f90:99b2:e74e:96a9:8304  prefixlen 64  scopeid 0x0<global>
        inet6 fd68:4aae:ed32:2300:2093:93ec:156e:304f  prefixlen 64  scopeid 0x0<global>
        inet6 2806:2f0:5001:2f90:48e4:ddf:d6b:40af  prefixlen 64  scopeid 0x0<global>
        inet6 fd68:4aae:ed32:2300:48e4:ddf:d6b:40af  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::7a16:c77f:c85e:9035  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:49:c6:a0  txqueuelen 1000  (Ethernet)
        RX packets 81  bytes 20020 (20.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 135  bytes 23576 (23.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

What can this wifi do under this circumstance?

Is it able to browse the Internet with no micro usb’s help but only the AP?

Could you check with traceroute command after the micro usb connected and see what is the packet route sent to the laptop from jetson?

Sorry, I am getting lost. What do you mean by AP? The last ifconfig ouput I sent correspond to the microUSB connected and login through it. Is it that what you requested? I am not sure now.

If I start the jetson with a monitor, keyboard and mouse, but no microUSB, it works fine. I can browse the Web, install and upgrade packages.

If I login with the microUSB, then login using SSH through the WiFi (not 192.168.55.1), and then logout and disconnect the microUSB cable, the SSH session keeps working, with Internet connection. At home at least, I can even SSH from another computer without problems. However, once all SSH connections are finished, I cannot connect again without firstly connecting the microUSB and login throught (either using screen or SSH to the 192.168.55.1 address).

Connected with the microUSB, from Jetson:

$ traceroute 192.168.100.4
traceroute to 192.168.100.4 (192.168.100.4), 30 hops max, 60 byte packets
 1  192.168.100.4 (192.168.100.4)  29.872 ms  31.175 ms  31.874 ms

I wonder if the message I get at login has anything to do with this:

This system has been minimized by removing packages and content that are not required on a system that users do not log into.

To restore this content, you can run the ‘unminimize’ command.

Access Point for WiFi is “AP”.

I see the wired eth0 never has an IP address, so I am assuming wired is not plugged into any router or AP.

I see when it works wlan0 has the suggested 192.168.100.170 address. Typical for having WiFi active. When not working wlan0 has no address. Typical for WiFi going down. Do note that the micro-USB virtual ethernet of 192.168.55.1 is a different subnet, and so it is possible that route setup (a combination of both the host and the Jetson) might be of interest.

Is it possible to see the “route” on your Android? Also, what does the “route” command show on both working and failing circumstances from the Jetson? I am basically interested in a more verbose list of information from what @WayneWWW is suggesting with the “traceroute” command (hoping your Android can run traceroute, it might be able to). Knowing simultaneously these three things for both failing and working circumstances would be useful, especially if this can be run on both Android and Jetson:

  • ifconfig to show addresses;
  • route to show which gateways or direct routes would be used;
  • traceroute to see what devices are being traversed.

Also, a Jetson has the ability to do some testing via ssh from itself to itself. In theory, if the micro-B USB is connected (even if the other end doesn’t work, this is just to set up address 192.168.55.1), then you could log in to the Jetson locally and test:

  • ssh localhost
  • ssh 192.168.55.1
  • ssh 192.168.100.170

Further, one could do some similar ping tests, but to the connected Android from the Jetson:

  • ping 192.168.55.100 # Note that this is the IP address from virtual micro-USB at the Android end.
  • ping 192.168.100.170 # This is essentially self-ping, but through another interface.
  • ping 192.168.100.4 # Note that direction of ping from Jetson to Android might differ compared to ping from Android to Jetson due to any kind of firewall rule or due to route setup.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.