SSH: controlling a robot remotely without connecting a display
Atlasbot · 20/8/2026 · 10 min read
Actual robots rarely have a permanently attached screen — embedded computers (Jetson, Raspberry Pi) are often controlled entirely over a network. SSH (Secure Shell) is the standard tool for opening a terminal session on another machine remotely, encrypting all transmitted data — this is how you will interact with the robot 90% of the time after the hardware is assembled.
How SSH works (as much as you need to know to use it)
SSH operates according to the client-server model: the robot (Jetson/Raspberry Pi) running SSH server (openssh-server) listens for connections on network port 22; Laptops use SSH client (ssh, available on Linux/macOS, and on Windows from version 10 onwards) to connect to. All data back and forth — including passwords — is encrypted, as opposed to older Telnet, which sent everything in plain text (which has long been considered insecure).
# Basic syntax: ssh <user>@<IP-address>
$ ssh [email protected]
[email protected]'s password:
Welcome to Ubuntu 22.04.4 LTS
atlas@jetson-01:~$
The first time you connect to a new machine, SSH will ask to confirm that machine's "fingerprint" — this is an anti-server tampering mechanism. Type yes to continue and save it for future use.
Find the robot's IP address
Need to know the robot's IP address before SSH access — run directly on the robot (via temporary screen or HDMI port):
$ hostname -I
192.168.1.42
If the network supports mDNS (usually available via the avahi-daemon package on Ubuntu), you can SSH using the hostname instead of having to remember the IP — convenient since the robot's IP can change every time the router is restarted:
$ ssh [email protected]
SSH key — login without typing a password every time
Typing a password every time you SSH is very inconvenient, especially when there is a script that automatically connects to the robot. SSH key solves this problem with an encryption key pair (public/private key) instead of a password:
# Create a key pair on your laptop (only need to do it once)
$ ssh-keygen -t ed25519
# Press Enter through the questions to use the default
# Copy the public key to the robot
$ ssh-copy-id [email protected]
# From now on, SSH login does not require a password anymore
$ ssh [email protected]
atlas@jetson-01:~$
The private key (private key) always stays on the laptop, never sent anywhere — only the public key (public key) is copied to the robot. This is why SSH keys are more secure than passwords: robots only store the public key, an attacker who gets it cannot use it to log back in.
Display remote graphical interface (X11 forwarding)
Sometimes it is necessary to view RViz2 or a graphic window running on the robot right on the laptop screen — use flag -X:
$ ssh -X [email protected]
$ rviz2 # The RViz2 window will appear on the laptop screen, even though it is running on the robot
X11 forwarding over the network is quite slow (each frame must be transmitted via SSH) — only suitable for quick testing, not for continuous monitoring of RViz2 while the robot operates.
Technical details
Parameters
Comparison of popular SSH key types — ed25519 is the current recommended choice for new keys:
| Key type | Characteristics |
|---|---|
ed25519 | Modern algorithm, shorter key but equally/higher security than RSA, fast signing speed |
RSA 4096 | Widely available, compatible with older systems, longer key (slightly slower) |
| Default SSH port | 22 — many administrators change to another port to reduce the number of automatic scans |
Protocol
Current SSH uses SSHv2 (SSHv1 has been considered insecure, almost no practical implementations use it anymore). The connection handshake consists of two stages: first, using asymmetric encryption (which is the public/private key pair or Diffie-Hellman key exchange) so that the two parties agree on a secret session key, then switching to symmetric encryption (symmetric, much faster) for all remaining data of the session — combining both types of encryption to be both secure when establishing the connection and fast during the actual data transfer.
Practical applications
When managing multiple robots at the same time (fleet), typing the full ssh [email protected] each time is very inconvenient and can easily confuse IP addresses between robots — the ~/.ssh/config file on a laptop allows short alias (alias) for each robot:
# ~/.ssh/config
Host robot1
HostName 192.168.1.42
User atlas
Host robot2
HostName 192.168.1.43
User atlas
After configuration, just type ssh robot1 or ssh robot2 — both faster and significantly reducing the risk of typing the wrong robot IP when working with multiple robots at the same time in one session.
Practical example: typical workflow with robots over SSH
$ ssh [email protected]
atlas@jetson-01:~$ cd ros2_ws
atlas@jetson-01:~/ros2_ws$ source install/setup.bash
atlas@jetson-01:~/ros2_ws$ ros2 launch my_robot bringup.launch.py
The entire assembly process → powering the robot → SSH from the laptop → running the launch file often completely replaces plugging the monitor/keyboard directly into the robot after the initial setup step.
Common mistakes
Connection refused— SSH server is not installed or running on the robot. Install withsudo apt install openssh-server, check running withsudo systemctl status ssh.Connection timed out— wrong IP address, or the laptop and robot are not on the same network (eg: the robot is connected to a different WiFi than the laptop).Permission denied (publickey)— disabled login with password on the server but the machine is SSHing from without the SSH key copied to it (ssh-copy-id).- IP changes every time the router is restarted — consider setting a static IP for the robot in the router configuration, or use the name
.localvia mDNS as instructed above.
Conclusion
SSH was the main "wire" connecting the laptop to the robot throughout the development process — understanding the basic connection, the SSH key, and how to find the robot's address was enough to get through day-to-day work without having to plug a screen into the robot every time. The next article in the category goes into USB & Serial — how Linux recognizes sensors/motors plugged in via USB ports, SSH access still needs to be understood to read the actual sensor data.
Get new articles and lessons by email
When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.
Unsubscribe any time with the link in each email. See our Privacy policy.