Skip to content

Instantly share code, notes, and snippets.

@lgg
Last active April 27, 2024 21:45
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgg/0ec1ab9651cca84bcf0ef145a996bd09 to your computer and use it in GitHub Desktop.
Save lgg/0ec1ab9651cca84bcf0ef145a996bd09 to your computer and use it in GitHub Desktop.
Install Remote Desktop on Jetson Nano

Install remote desktop / remote control for Jetson Nano

Anydesk doesn't support and doesn't work on Jetson Nano (aarch64). So you will need to install VNC, the easiest and fastest is to install the X2Go server. NoMachine, TeamViewer, AnyDesk, OpenVino, VNC, RDP, XRDP, Remote access for Jetson Nano / Xavier.

Installation

  • sudo apt update
  • sudo apt upgrade
  • sudo apt install openssh-server vim git gcc g++ net-tools
  • sudo apt-get install xubuntu-desktop (select lightdm)
  • sudo apt-get install x2goserver x2goserver-xsession
  • sudo apt autoremove
  • sudo reboot

(Optional) install jtop

jtop interface

A very usefull tool for Jetson's devices. Analog of htop.

  • sudo apt install python3 python3-dev python3-venv python3-pip
  • sudo -H pip3 install -U jetson-stats
  • sudo reboot
  • jtop (CTRL+C or q to exit)
  • Source code

Remote connection behind the NAT

You will need a server with public ip address (buy it e.g. at Digital Ocean). By this link you will receive free credit and get started on DigitalOcean with a $100, 60-day credit for new users. Enable SSH on your public server.

  • Enable SSH port forwarding on all interfaces: StackOverflow
    • add this GatewayPorts clientspecified to /etc/ssh/sshd_config
    • sudo service ssh restart

On jetson nano

  • create file ~/remote_ssh.sh with content: ssh -o StrictHostKeyChecking=no -o ExitOnForwardFailure=yes -fN -R 0.0.0.0:REMOTE_PORT:0.0.0.0:22 REMOTE_USER@REMOTE_IP
    • REMOTE_PORT - port for SSH forwarding on remote server
    • 22 - SSH port on your Jetson Nano (22 by default)
    • REMOTE_USER - SSH user for your public server
    • REMOTE_IP - ip of your public server
    • e.g.: ssh -o StrictHostKeyChecking=no -o ExitOnForwardFailure=yes -fN -R 0.0.0.0:30303:0.0.0.0:22 remotessh@81.200.178.100
  • chmod: chmod +x ~/remote_ssh.sh
  • edit crontab: crontab -e and add content: * * * * * /home/ubuntu/remote_ssh.sh >> /home/ubuntu/ssh.log
  • for pass SSH auth you can use sshpass (sudo apt install sshpass)
    • e.g. ~/remote_ssh.sh content will be: sshpass -p "MYSUPERPASSWORDHERE" ssh -o StrictHostKeyChecking=no -o ExitOnForwardFailure=yes -fN -R 0.0.0.0:REMOTE_PORT:0.0.0.0:22 REMOTE_USER@REMOTE_IP

Usage

Now connect with X2Go-client with: REMOTE_IP and REMOTE_PORT and Jetson's user. In my case: 81.200.178.100, 30303 and remotessh

X2Go client example

Fake monitor / fake display / HDMI Dummy

HDMI dummy

You can buy it on AliExpress only for 1$

Credits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment