ssh into Jetson TX2 via hotspot without using internet

I want to ssh into my Jetson TX2 from my macbook. I do not need internet for this setup so I don’t need to create a wifi access point for the TX2 (I think!). I activated the hotspot in the Jetson by going to System Settings and then Network and then click on Use as Hotspot…. In my macbook, I can see the Jetson hotspot and I can connect to it. But, I cannot ssh into it from my macbook.

I tried this (while my macbook is connected to the jetson hotspot):

╰─$ ssh ubuntu@10.42.0.1
ssh: connect to host 10.42.0.1 port 22: Network is unreachable

So my questions are:

  1. Is this method feasible for SSHing into the Jetson?

  2. Am I missing anything? Can you provide me with the instructions to do this?

Thank you.

Are you able to ping 10.42.0.1 from your mac?

Yes. This is the log:

(base) ╭─saeedarabi@arabi-mac ~
╰─$ ping 10.42.0.1
PING 10.42.0.1 (10.42.0.1): 56 data bytes
64 bytes from 10.42.0.1: icmp_seq=0 ttl=64 time=10.965 ms
64 bytes from 10.42.0.1: icmp_seq=1 ttl=64 time=22.685 ms
64 bytes from 10.42.0.1: icmp_seq=2 ttl=64 time=12.909 ms
64 bytes from 10.42.0.1: icmp_seq=3 ttl=64 time=7.906 ms
64 bytes from 10.42.0.1: icmp_seq=4 ttl=64 time=11.605 ms
64 bytes from 10.42.0.1: icmp_seq=5 ttl=64 time=6.890 ms
64 bytes from 10.42.0.1: icmp_seq=6 ttl=64 time=12.694 ms
64 bytes from 10.42.0.1: icmp_seq=7 ttl=64 time=1.785 ms
64 bytes from 10.42.0.1: icmp_seq=8 ttl=64 time=13.556 ms
64 bytes from 10.42.0.1: icmp_seq=9 ttl=64 time=12.378 ms

and when I try to ssh, after entering the password I receive this: (nvidia-desktop is the name of hotspot on the Jetson)

(base) ╭─saeedarabi@arabi-mac ~
╰─$ ssh nvidia-desktop@10.42.0.1
nvidia-desktop@10.42.0.1's password:
Permission denied, please try again.

Can you log in locally to the Jetson, and run this prior to attempting to ssh to the Jetson:

sudo tail -f /var/log/auth.log

Then try to ssh in (one command line terminal to monitor the log, another to run the ssh app). Let us know what shows up in that log during the login.

Also, while logged in locally to the Jetson, and assuming (from the above) that the login account name is “saeedarabi”, can you ssh in like this (ssh from the Jetson to the Jetson with no outside host involved):

ssh saeedarabi@127.0.0.1

Does this work? If not, what does the log change show in the auth.log file?

Here is what you asked: (there is no host machine involved here. Everything is done on the Jetson)

Terminal 1:

nvidia@nvidia-desktop:~$ ssh saeedarabi@127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:odfJmTXdR1xxLyf5Nm2l4OdHV+Zeidyc3v90XoDXkdc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.
saeedarabi@127.0.0.1's password: 
Permission denied, please try again.
saeedarabi@127.0.0.1's password:

Terminal 2:

sudo tail -f /var/log/auth.log
[sudo] password for nvidia: 
Nov  6 17:39:59 nvidia-desktop gcr-prompter[8094]: Gcr: couldn't find the callback for prompting operation /org/gnome/keyring/Prompt/p4@:1.8
Nov  6 17:39:59 nvidia-desktop gnome-keyring-daemon[5650]: asked to register item /org/freedesktop/secrets/collection/login/3, but it's already registered
Nov  6 17:39:59 nvidia-desktop gcr-prompter[8094]: Gcr: calling the PromptDone method on /org/gnome/keyring/Prompt/p4@:1.8, and ignoring reply
Nov  6 17:40:09 nvidia-desktop gcr-prompter[8094]: 10 second inactivity timeout, quitting
Nov  6 17:40:09 nvidia-desktop gcr-prompter[8094]: Gcr: unregistering prompter
Nov  6 17:40:09 nvidia-desktop gcr-prompter[8094]: Gcr: disposing prompter
Nov  6 17:40:09 nvidia-desktop gcr-prompter[8094]: Gcr: finalizing prompter
Nov  6 17:40:38 nvidia-desktop gnome-keyring-daemon[5650]: asked to register item /org/freedesktop/secrets/collection/login/3, but it's already registered
Nov  6 17:41:02 nvidia-desktop sudo:   nvidia : TTY=pts/0 ; PWD=/home/nvidia ; USER=root ; COMMAND=/usr/bin/tail -f /var/log/auth.log
Nov  6 17:41:02 nvidia-desktop sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov  6 17:43:25 nvidia-desktop sshd[8355]: Invalid user saeedarabi from 127.0.0.1 port 42506
Nov  6 17:43:39 nvidia-desktop sshd[8355]: pam_unix(sshd:auth): check pass; user unknown
Nov  6 17:43:39 nvidia-desktop sshd[8355]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=127.0.0.1
Nov  6 17:43:41 nvidia-desktop sshd[8355]: Failed password for invalid user saeedarabi from 127.0.0.1 port 42506 ssh2
Nov  6 17:44:03 nvidia-desktop sshd[8355]: Connection closed by invalid user saeedarabi 127.0.0.1 port 42506 [preauth]

I repeated the process using nvidia instead of the saeedarabi and I could ssh:

Terminal 1:

nvidia@nvidia-desktop:~$ ssh nvidia@127.0.0.1
nvidia@127.0.0.1's password: 
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.9.140-tegra aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

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.

314 packages can be updated.
105 updates are security updates.

Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings

Last login: Wed Nov  6 16:17:53 2019 from 10.42.0.88

Terminal 2:

nvidia@nvidia-desktop:~$ sudo tail -f /var/log/auth.log
Nov  6 17:41:02 nvidia-desktop sudo:   nvidia : TTY=pts/0 ; PWD=/home/nvidia ; USER=root ; COMMAND=/usr/bin/tail -f /var/log/auth.log
Nov  6 17:41:02 nvidia-desktop sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov  6 17:43:25 nvidia-desktop sshd[8355]: Invalid user saeedarabi from 127.0.0.1 port 42506
Nov  6 17:43:39 nvidia-desktop sshd[8355]: pam_unix(sshd:auth): check pass; user unknown
Nov  6 17:43:39 nvidia-desktop sshd[8355]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=127.0.0.1
Nov  6 17:43:41 nvidia-desktop sshd[8355]: Failed password for invalid user saeedarabi from 127.0.0.1 port 42506 ssh2
Nov  6 17:44:03 nvidia-desktop sshd[8355]: Connection closed by invalid user saeedarabi 127.0.0.1 port 42506 [preauth]
Nov  6 17:49:19 nvidia-desktop sudo: pam_unix(sudo:session): session closed for user root
Nov  6 17:49:23 nvidia-desktop sudo:   nvidia : TTY=pts/0 ; PWD=/home/nvidia ; USER=root ; COMMAND=/usr/bin/tail -f /var/log/auth.log
Nov  6 17:49:23 nvidia-desktop sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov  6 17:49:43 nvidia-desktop sshd[8417]: Accepted password for nvidia from 127.0.0.1 port 42516 ssh2
Nov  6 17:49:43 nvidia-desktop sshd[8417]: pam_unix(sshd:session): session opened for user nvidia by (uid=0)
Nov  6 17:49:43 nvidia-desktop systemd-logind[4327]: New session 3 of user nvidia.

FYI, I was able to ssh into the Jetson from the host computer by connecting both Jetson and host to a wifi internet.

As far as I can tell from this the user “saeedarabi” does not exist:

Nov  6 17:43:25 nvidia-desktop sshd[8355]: Invalid user saeedarabi from 127.0.0.1 port 42506

Obviously user “nvidia” does exist. Are you able to log in to user “saeedarabi” by any method? If you run the command “whoami” it should say the user login name, and I’m going to be surprised if “saeedarabi” shows up. I won’t guarantee it shows up (or does not show up) since ssh has its own settings which can reject some users, but an “Invalid user” is different from failed credentials, and you might have some missing ssh requirements.

By what method did you create the “saeedarabi” account?

The result of “whoami” was “nvidia”. I am not sure how I created “saeedarabi” (or even if I created that!).

FYI, I was able to ssh into the jetson from my macbook using the jetson hotspot (without using internet). I used

ssh nvidia@10.42.0.1

while my macbook was connected to the jetson hotspot.

So this isn’t actually an ssh issue…the account is the issue. From the Jetson, what do you see anything from:

grep 'saeedarabi' /etc/passwd

If you do see this, then the account exists. The account could still have other issues, but I’m going to guess it isn’t there at all. “Invalid user” is a different error than bad login credentials.

So the account “nvidia” is the only known working login account, and if this works, then all of ssh is working. Just to test for functionality, after “whoami” says “nvidia”, are you able to run the command “sudo ls”? You’d be required to enter the password for user “nvidia”. If you can do this, then the account for “saeedarabi” can be created and/or fixed.