Setting up an SSH jump host with ProxyJump on CentOS
Most Australian sysadmins no longer walk into a Sydney or Melbourne data centre to touch a server. They work from a home office in Brisbane or Perth, balance a laptop on a train, and still administer boxes in regional offices, cattle stations in northern Queensland, and cloud instances billed in Australian dollars. Those targets usually have no public address, so access funnels through a single machine holding a static IP: the jump host, or bastion.
OpenSSH's ProxyJump feature removes the need for awkward chained commands. Your workstation connects to the bastion, then asks it to open a direct TCP channel to the target, so the target sees one clean session from one known source and never needs its own internet-facing firewall rule. The same mechanism works for scp and rsync, which makes it far easier to ship a config file to a customer or pull down a backup from a laptop.
CentOS Stream 9 is a sensible base because the whole toolkit sits in the base repositories: openssh-server, firewalld, SELinux and systemd, with no third-party repository required. The steps below cover hardening the daemon, writing a reusable client configuration, testing the path from a laptop and from a phone, and keeping the service running under systemd.
Why a bastion still earns its keep
A jump host collapses attack surface to one address you can allow-list in every downstream firewall. Under the Australian Signals Directorate's Essential Eight, limiting exposure and logging privileged access both count, and a single entry point gives auditors one stream of sshd logs rather than a dozen scattered across the estate.
The legal framing matters too. Access records that identify who reached which system support obligations under the Privacy Act 1988 and the Notifiable Data Breaches scheme, particularly when those systems hold personal information. Log the metadata — source address, account, command, timestamp — but avoid capturing tunnel payloads. Australian telecommunications secrecy rules make content inspection a poor habit to build into a bastion, and it buys little for an operations team.
Geography strengthens the case. A bastion hosted in a Sydney cloud region or on a Telstra Business fibre connection in Melbourne becomes the one allow-listed source for firewalls in Adelaide, a mine site outside Townsville, or a farm running on a fixed wireless link. Regional sites on Starlink or an NBN business plan benefit most, because a single static egress IP removes the need for dynamic DNS on every internal service.
Preparing a minimal CentOS server
Start with a lean install and the standard SSH packages. CentOS Linux 7 reached end of life in June 2024, so use CentOS Stream 9 or a RHEL 9 rebuild rather than an archived mirror. Update first, then install and enable the daemon:
sudo dnf update -y
sudo dnf install -y openssh-server openssh-clients
sudo systemctl enable --now sshd
Open the firewall and keep it narrow. firewall-cmd --permanent --add-service=ssh followed by a reload permits port 22 and nothing else, because the bastion needs no inbound HTTP, DNS or database access. If you move the daemon to a non-standard port such as 2222, SELinux needs a matching rule: semanage port -a -t ssh_port_t -p tcp 2222, then restart sshd.
Australian broadband providers hand out both address families, and internal networks in government and enterprise sites are increasingly dual-stack. Pinning the right family on the jump host avoids surprises when a target publishes only an IPv6 address. The walkthrough on configuring IPv6 on RHEL 9 interfaces covers the sysctl and nmcli settings that keep forwarding coherent across both stacks.
Locking down sshd for forwarding
Authentication should be key-only. Generate an Ed25519 key with ssh-keygen -t ed25519 -C "workstation", protect the private half with a passphrase, and rely on a YubiKey or a hardware token for the highest-privilege accounts. On the bastion, install the public key into ~jumpuser/.ssh/authorized_keys with permissions 700 and 600, then disable passwords entirely.
The daemon configuration is where most bastions get it wrong. ProxyJump depends on the jump host permitting TCP forwarding, so AllowTcpForwarding yes must stay enabled while everything else tightens:
PermitRootLogin no
PasswordAuthentication no
X11Forwarding no
AllowTcpForwarding yes
PermitOpen 10.20.0.15:22 10.20.0.16:5432
PermitOpen any
That last line in this example is deliberately permissive for readability; in practice, list every destination the bastion is allowed to reach and nothing else. Match Address 203.0.113.0/24 blocks give per-network control, and MaxAuthTries 3 stops password-guessing noise from filling the journal during overnight scans.
Building a reusable client configuration
The client-side ~/.ssh/config is what turns a bastion into a transparent hop. Two stanzas are enough to start:
Host bastion
HostName 203.0.113.10
User jumpuser
IdentityFile ~/.ssh/id_ed25519_bastion
ServerAliveInterval 30
ServerAliveCountMax 3
Host app01
HostName 10.20.0.15
User deploy
IdentityFile ~/.ssh/id_ed25519_app01
ProxyJump bastion
ControlMaster auto
ControlPath ~/.ssh/cm/%r@%h:%p
ControlPersist 10m
ProxyJump opens the intermediate connection for you, so ssh app01 behaves like a direct login while the traffic actually traverses the bastion. ControlMaster keeps the first connection alive and reuses it, which matters when a Perth uplink takes a second to acknowledge each packet. ServerAliveInterval stops NAT gateways on a home NBN connection from silently dropping an idle session.
Because every host now carries its own key and options, keeping the file tidy becomes a daily task rather than a quarterly cleanup. The guidance on managing SSH config covers agent-based key handling and how ssh-add fits into the workflow. For file transfers, scp -J bastion file deploy@10.20.0.15:/srv/ and rsync -e "ssh -J bastion" reuse the same path without extra tunnel bookkeeping.
Testing the tunnel and chasing failures
Run ssh -v -J bastion app01 and read the output line by line. It names each hop, shows whether the key was offered and accepted, and reveals exactly which address failed. On a fresh minimal image, missing host keys cause an immediate refusal; sudo ssh-keygen -A regenerates them. Stale entries in ~/.ssh/known_hosts produce the familiar host key warning, and removing only the offending entry is safer than clearing the whole file.
A phone is a useful second test, particularly when a home broadband connection is the suspect. A Termius or JuiceSSH client on Android can carry the same public key and confirm that the bastion accepts sessions from a mobile network rather than only from the office. The tutorials at Android Tutorial Point walk through generating a key pair on the handset and importing it into an SSH client, which removes the need to carry a laptop onto a site visit.
Common failures have recognisable signatures. A channel open failed: administratively prohibited message almost always means PermitOpen excluded the destination. A Permission denied (publickey) points at the key, not the tunnel. Silent hangs usually trace to a dropped idle session or an IPv4/IPv6 mismatch between the bastion and the target, and ausearch -m avc -ts recent will surface any SELinux denial that blocked the outbound channel.
Keeping the jump host in service
Wrap the daemon in a systemd unit with Restart=on-failure and RestartSec=5, so an unattended upgrade or a kernel change does not strand the team. Journald handles log growth, and a nightly audit export to your SIEM gives the retention that auditors expect under the Essential Eight's logging guidance. Schedule patching during a quiet window, and check the bastion's reachability from a second network after each update, since a firewall rule lost in a firewalld reload can break access for everyone at once.
Rota planning deserves attention too. Sydney and Brisbane run on UTC+10, while Perth and Darwin sit on UTC+8, so a handover scheduled across states genuinely gains two hours. An outage in one city should not be a city outage for the business if the bastion can be rebuilt quickly from a template or mirrored to a secondary region.
The concrete next step is to paste the two Host stanzas into your own ~/.ssh/config, then run ssh -v -J bastion app01 once from a connection outside the office network and keep that verbose output beside the file as a known-good baseline.