rescueshell Start trial

SSH into a Proxmox host behind CGNAT

A Proxmox server at a client's site, a holiday home or a rack behind a mobile or satellite link often has no public address. When a VM hangs or the network bridge breaks, you need a shell on the host, and nothing can connect in.

Why you cannot dial in

Port forwarding needs a public IPv4 address on the router. Behind carrier-grade NAT there is none, so a forward for port 22 or for the web UI on 8006 is never reached. To check, compare the WAN address on the router's status page with your public IP. If they differ, or the WAN address is between 100.64.0.0 and 100.127.255.255, see SSH behind CGNAT. The host has to dial out.

Do not publish the Proxmox web interface or SSH on a public address as a workaround. Both are login pages for the machine that runs everything else.

Ways to reach the host

What a shell on the host is for

This is a shell on the Proxmox host, not the Proxmox web interface. Port forwarding through a session is off, so port 8006 is not reachable this way. What you can do is what you can do at the host's console:

These are Proxmox's and Debian's own commands, listed here as the kind of job a shell does. We have not run them through RescueShell on a Proxmox host.

Careful with the network config

The agent reaches the relay through the host's own network, usually through the same bridge you are editing. A bad change to /etc/network/interfaces can cut the connection your shell is riding on, and nobody on site can put it back. Keep the old file, change one thing, apply it, and have a way back that does not depend on the shell, such as a timed job that restores the old file if you have not cancelled it. Once the link is up again the agent reconnects by itself. Until then the host is out of reach.

RescueShell on a Proxmox host

Proxmox VE is built on Debian, so the Debian steps apply. We test Debian 12 and Ubuntu 24.04 containers, not Proxmox, and we have not run the installer on a Proxmox host. Check these on a test machine first.

1. Check the CPU and OpenSSH

uname -m
systemctl is-active ssh
command -v curl openssl

The installer has builds for amd64, arm64, armv7 and armv6, chosen from uname -m. A Proxmox host is normally amd64. Sessions go to the host's own OpenSSH server, which Proxmox installs. Without OpenSSL 3 the installer wants --sha256; see Debian and Ubuntu. The installer never installs packages itself.

2. Install

Create a token in the dashboard, then run this on the host as root:

curl -fsSL https://releases.rescueshell.com/latest/install.sh | sh -s -- \
  --base-url https://releases.rescueshell.com/latest --relay https://app.rescueshell.com \
  --name pump-07 --trust-keys-from pi

Proxmox administration is done as root, so you will most likely want to trust root: replace --trust-keys-from pi with --trust-keys-from root if root has the keys you use in ~/.ssh/authorized_keys. Otherwise use --trust-key 'ssh-ed25519 AAAA… you@laptop' --allow-user root, or copy the Add device command from the web app. The installer lists each key it will trust and asks you to confirm, and our servers cannot add one. See add a device.

On a cluster node, root's authorized_keys is normally a link to a file shared by the whole cluster. The installer refuses --trust-keys-from for a file that is a link, so there use --trust-key with --allow-user root instead. Each host is its own device with its own trusted keys, so install on every node you want a shell on.

3. What it sets up

When the link drops, the agent retries every 60 seconds, five times, then waits 30 minutes and starts over. It needs outbound HTTPS and nothing inbound. On a mobile link, see SSH over 4G or LTE for what that costs in data.

What it does not do

If the shell does not open, see the shell does not open.

Try it on one host

The first device is free to try with no card, for 30 days from when it connects, not from when you sign up. Start a trial.