Very excited to have flashed a working OS to my Jetson Orin Nano.
Unfortunately, during the install, the installer failed to get the SDK components. I figured this was fine and I could handle it more appropriately later once I booted into the OS onboard the device. I’m very comfortable with the command line, so I figured a manual install of these components after the fact wouldn’t be too difficult.
Upon booting into the Jetson OS, I can’t seem to get an SSH connection going. In hindsight, the SDK manager did say it couldn’t do the SDK component installs because of some issue with SSH.
I’d like to get SSH going and install the missing components. The error I’m getting when tryin to start OpenSSH is “sshd no hostkeys available”. Though I was able to find keyfiles in the appropriate directory, so this didn’t make much sense to me.
You are correct that JetPack/SDK Manager should be able to add optional components later. Many people don’t notice that you can uncheck steps, e.g., uncheck flash.
On the Jetson, are you using the virtual wired Ethernet over USB for this? Or are you using another connection type, e.g., actual wired Ethernet? What do you see from “ifconfig” (or alternately, “ip -s addr”)?
If you are on the actual Jetson can you:
ssh <your account name on Jetson>@localhost
ssh <your account name on Jetson>@192.168.55.1
ping 192.168.55.100
If you are on the host PC, can you:
ssh <your account name on PC>@localhost
ssh <your account name on PC>@192.168.55.100
ping 192.168.55.1
Note: There is no reason why a default install would not install the right components. It can happen, but usually it is for some odd reason. It is a good idea to find out for certain if it is host or Jetson failing. Also, sometimes the host PC itself is blocking this due to firewall rules or restrictions on using USB network devices (it isn’t necessarily missing software, but the particular error tends to point to this).
I’m using a WiFi connection, I don’t really have ethernet access. To clarify, I want to access the jetson over wireless SSH, I don’t want to have anything connected to it
But on the host machine, even with USB connected, I get an ssh connection refused message on these commands
The address 192.168.55.1 is from the USB wired Ethernet emulation (the host PC would be address 192.168.55.100). Assuming the Jetson was fully booted and the USB is correctly connected between host PC and Jetson, what happens with ssh?
Using the Wi-Fi address would change security (there can be both Wi-Fi requirements and other firewall requirements; it is hard to predict). Was your testing using the 192.168.55.1 address to go from host to Jetson? And is it the same result going from Jetson to host using 192.158.55.100? Knowing what happens with ssh using those addresses would say a lot.
On both Jetson and host PC (be sure to mark which one as you gather information; it won’t be useful if we don’t know which is host and which is Jetson), what do you see from:
cd /etc/ssh
ls -l
Note that all we are looking for in this latter is what the permissions are since incorrect permissions can cause other behavior. Missing files would be different, and could be generated.
If there are files in the /etc/ssh directory, then you can move on to finding out what a verbose ssh attempt looks like, and attach this to the forum (you can edit anything you find confidential):
# From host PC.
ssh -v <your login name>@192.168.55.1 2>&1 | tee log_usb_ethernet.txt
# You could try the same over Wi-Fi; I will pretend Wi-Fi is 192.168.1.2,
# but adjust accordingly:
ssh -v <your login name>@192.168.1.2 2>&1 | tee log_wifi.txt
The /etc/ssh files should tell us if installation is at least “mostly” complete. The verbose ssh over virtual wired USB ethernet should tell us if the sshd server is responding. The Wi-Fi verbose ssh should give information related to new issues over Wi-Fi.
Verbose SSH from Host to Jetson
OpenSSH_8.9p1 Ubuntu-3ubuntu0.11, OpenSSL 3.0.2 15 Mar 2022
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 *
debug1: Connecting to 192.168.55.1 [192.168.55.1] port 22.
debug1: connect to address 192.168.55.1 port 22: Connection refused
ssh: connect to host 192.168.55.1 port 22: Connection refused
note that there is nothing in ssh_config.d could that be the problem?
Reflashing might of course end up being faster/easier. If you want to find the cause though, keep reading.
Can you log in to the Jetson and ssh to itself? Can you log in to the host PC, and ssh to itself? This is sort of like “loopback”, and sometimes the “localhost” or “127.0.0.1” address is called loopback, and so from either to itself:
ssh <login name>@localhost
ssh <login name>@127.0.0.1
Note that if ssh works it will probably say something about having not used this connection before and are you ok with not being able to verify, which is normal since most people don’t have all certs.
Speaking of this, you can log an ssh session. Using one of the above as an example (just append " 2>&1 | tee logfilename.txt"): ssh <login name>@localhost 2>&1 | tee log_ssh_session.txt
The verbose output could then be attached as a file. Also, it might be interesting to watch “dmesg --follow” on both systems to see what shows up during an attempt to ssh from host to Jetson.