Access Devices Remotely
Reach a service on a connected device, such as its SSH server or web interface, without opening ports on the device’s network. Nexigon offers three ways:
- Port forwarding with Nexigon CLI connects a port on your workstation to a port on the device. Use it for SSH and any other TCP service.
- Browser URLs open a device’s web interface through Nexigon Hub, without a local process.
- The browser terminal opens a shell on the device from the web interface.
Before You Start
You need a connected device and permission to access it remotely. For port forwarding, install and configure Nexigon CLI on your workstation.
The Nexigon CLI commands assume an organization API token. With a user token,
add --organization <org-id> to each command, as
Organization Selection
describes.
Permit the Device Ports
Nexigon Agent forwards connections only to ports that its configuration permits. An HTTP export permits its own port and shows the service in the web interface. Other ports need the forwarding allowlist. For example, to export a web interface on port 80 and permit SSH on port 22:
[[exports]]
name = "Web UI"
protocol = "http"
port = 80
[forwarding]
enabled = true
allowed-tcp-ports = [22]Restart Nexigon Agent after changing its configuration. Both settings permit raw TCP access to the port, and Nexigon Hub still checks that you may access the device remotely. Remote Access describes the complete policy.
Find the Device
Copy the device ID, beginning with d_, from the device’s page in Nexigon.
Alternatively, list the projects and the devices of a project:
nexigon-cli projects list
nexigon-cli projects devices list <project-id>
The device list returns up to 100 devices, newest first. If the output contains
page.nextCursor, pass it with --cursor to list more.
Connect over SSH
Forward local port 2222 to the device’s SSH port:
nexigon-cli forward <device-id> 2222:22
Leave the command running. In another terminal, connect to the local port:
ssh -p 2222 root@127.0.0.1
Replace root with the SSH user configured on the device. Your Nexigon API
token authorizes the tunnel; the SSH server still checks the user’s key or
password. Press Ctrl+C in the forwarding terminal to close the tunnel.
Forward Several Ports
Pass one <local-port>:<device-port> pair for each service:
nexigon-cli forward <device-id> 2222:22 8080:80
While the command runs, http://127.0.0.1:8080 opens the device’s web
server. Nexigon CLI listens only on 127.0.0.1, so other machines cannot use
the forwarded ports.
Open a Browser URL
On the device’s page, choose Generate URL and select the HTTP service. The URL opens the service through Nexigon Hub and works without a local process. With Nexigon CLI, issue a URL that is valid for ten minutes:
nexigon-cli http-proxy issue-url <device-id> --port 80 --valid-for 600
Open the url field of the JSON output. The URL contains an access token, so
anyone with the link can use it until it expires. Treat it as a credential.
Open the Browser Terminal
The browser terminal opens a shell on the device from its page in Nexigon, independently of SSH. Enable it in the agent’s configuration and choose the account that runs the shell:
[terminal]
enabled = true
user = "root"Enable the terminal only on devices where remote shell access is intended.
Troubleshooting
| Symptom | What to Check |
|---|---|
| Authentication or permission failure | Nexigon CLI uses the intended Nexigon Hub instance and a token that may access this device remotely. |
| Local port is already in use | Choose another local port, such as 2223:22, and connect SSH to port 2223. |
| Tunnel opens but the service cannot be reached | The device is connected, the service accepts connections on 127.0.0.1, and the agent’s configuration permits the port. |
| SSH rejects the login | The device’s SSH user, key, and password. |
| A browser URL stops working | The URL has not expired, and the device and its HTTP service are online. |