Setting Up Automatic Login for NVIDIA Jetson TX2 NX via SSH or UART

I have an NVIDIA Jetson TX2 NX SOM module that I can connect to via SSH or UART. How can I configure the system for automatic login without requiring a username and password?

I recommend that you use public/private key pairs on ssh. If you have a particular host PC running Linux, and you create a key pair, you can then copy the “public” key to the Jetson and any ssh login to that user on the Jetson from the specific user on the host PC will “just work” without a password. This is in fact more secure than using a password, and definitely better than no password (ssh is the most tried port to hack; the moment an ssh port shows up to a public address you have less than 60 seconds before the first brute force attack is attempted).

Is your host PC Linux? Would you like information on public/private ssh key pairs?

The laptop runs Linux and uses a private SSH key

Can you use “ssh” from laptop to Jetson now? Do you have a specific user account on the Jetson to connect? I am going to assume that the Jetson has user name “rahul”, and that from the host PC you can do this (I am assuming the ssh address is 192.168.55.1, but adjust for your case):
ssh rahul@192.168.55.1

If that works, then you can do this from the host PC/laptop:
ssh-copy-id rahul@192.168.55.1
(if you use a different address, then you’ll need to repeat this)

Then exit the ssh connection, and each time you log in like that you’ll “just log in”. This will appear to be without passwords, but it is more secure and uses public/private key pairs. Only the public part of your laptop’s key pair gets put onto the Jetson.

I recommend the host PC you work from have ssh-copy-id to the Jetson, but not the reverse path.

Note: One can actually unlock the root user on Ubuntu, set up ssh keys, and then re-lock root and have proper root ssh.

Important: There may also be some required ssh daemon configuration required at times. It just depends what you are doing. Ask here if you find you need the sshd configuration edited. The most prominent example of needing edit is that ssh will normally reject root login. Additional useful edits might include disabling all password-based ssh login (useful if you have public keys on your Jetson and no longer need a password login; adds security).

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