Reach a server through one SSH jump host
The AnyPane equivalent of ssh -J user@bastion user@target,
or ProxyJump in ~/.ssh/config. One hop per
connection.
What a jump host does
A jump host, or bastion, is the one server you can reach from outside; the servers behind it only accept connections from inside the network. Your device opens an SSH session to the bastion, asks it to relay a TCP connection to the target’s SSH port, and runs a second SSH session to the target through that relay.
As with ssh -J, the target session is tunneled through
the bastion end to end; the bastion only forwards TCP. It never sees
what you type on the target or the target’s credentials.
The OpenSSH setup it replaces
The steps below match this ~/.ssh/config:
-
Host bastionwithHostName bastion.example.comandUser ops -
Host appwithHostName 10.0.1.20,User deployandProxyJump bastion
Set it up
- Save the bastion as an SSH connection with its own address, username and password or Ed25519 key. Leave its Jump Host on None (direct).
-
Create the target connection: address, port, username and
credential. Use the address the bastion can reach, often a private
IP such as
10.0.1.20or an internal hostname. - Under Route, set Jump Host to the bastion.
- Add the target to a workspace and connect. Verify both host keys on first connect.
The target address is resolved by the bastion, so internal DNS names work. Each hop can use a different user and credential, and one bastion can serve any number of targets.
Use the same route for VNC and forwards
Pick the target as the SSH Tunnel of a VNC connection, or as the SSH connection of a local forward, and that traffic also goes through the bastion. See VNC over SSH and SSH local port forwarding.
Prepare the bastion
-
The bastion’s sshd must allow
AllowTcpForwarding.DisableForwarding yes, or aPermitOpenlist without the target’s SSH port, also blocks the hop. Check withsudo sshd -T | grep -iE 'forwarding|permitopen'. - The bastion needs a route to the target’s host and SSH port: check firewalls and security groups.
- The target must accept password or public key auth from your user.
Troubleshooting
- The bastion connects, the target times out
- Connect to the bastion on its own first. Then check that the target address is the one the bastion can reach, and that nothing between them blocks the SSH port.
- The relay is refused
- TCP forwarding is turned off or restricted in the bastion’s sshd. See Prepare the bastion.
- Authentication fails on the target
- The target uses its own user and credential, not the bastion’s. Keys must be Ed25519 in OpenSSH format. Bastions that ask for a one-time code or another keyboard-interactive prompt aren’t supported.
- Host key changed
- A changed host key on either hop blocks the connection. Verify the new fingerprint out of band before you update trust.
Limits
Chained jump hosts are not supported (no -J a,b), so the
bastion itself must be a direct connection. No ProxyCommand or SSH
agent. Password or Ed25519 key auth only.
FAQ
- Is a jump host the same as agent forwarding?
- No. With a jump host, your key stays on your device and the bastion only relays the connection. AnyPane doesn’t support agent forwarding.
- Can the bastion and the target use different keys?
- Yes. Each connection has its own credential.
- Can I go through two bastions?
- No. One jump host per connection, and the jump host must connect directly.
Related
Get AnyPane
For iPhone, iPad and Mac.