Skip to main content

SSH Remote Access

Remote access allows you to control the board over a network. This tutorial focuses on SSH remote control within a local area network (LAN).

For users without a display, you can configure SSH remote access by following the Serial Debugging guide and running the commands below.

tip

Ensure both devices are on the same local network:

  1. Verify both devices have IP addresses in the same subnet.
  2. Test connectivity by pinging each device's IP address.

Install OpenSSH

To enable SSH remote control, install the OpenSSH server by running the following commands in the Radxa ROCK 4D terminal:

radxa@radxa-4d$
sudo apt update
sudo apt install openssh-server -y

Start SSH Service

Run the following command to start the SSH service on your ROCK 4D:

radxa@radxa-4d$
sudo systemctl start ssh

Enable SSH Service on Boot

To ensure the SSH service starts automatically on boot, run:

radxa@radxa-4d$
sudo systemctl enable ssh

Check SSH Service Status

To verify the SSH service status, use the following command:

radxa@radxa-4d$
sudo systemctl status ssh

The output will show whether the SSH service is active and enabled to start on boot:

● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; preset: enabled)
Active: active (running) since Tue 2025-05-27 10:18:30 UTC; 4min 39s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 1841 (sshd)
Tasks: 1 (limit: 4659)
Memory: 5.3M
CPU: 608ms
CGroup: /system.slice/ssh.service

SSH Remote Login

On another device, open a terminal and use the following command to connect. You can find the ROCK 4D's IP address using the ip a command.

Host-PC$
ssh <user-name>@<ip-address>

# Example

ssh [email protected]

Where <user-name> is your ROCK 4D username and <ip-address> is the board's IP address.

① : Query the ROCK 4D's IP address (in this case, obtained via serial connection).

② : The actual IP address of the ROCK 4D.

③ : Remote login to ROCK 4D via SSH.