Configure SSH and X11 Forwarding¶
Configure your local SSH once to connect to ALCF login nodes with short names like ssh aurora, then optionally enable X11 forwarding for graphical applications. No VPN is required to reach ALCF systems from the internet; connect directly with SSH over the public network.
No VPN required
You do not need a VPN to SSH to ALCF login nodes. Connect directly from your local machine with ssh <username>@aurora.alcf.anl.gov or the short names configured below. If your institution routes SSH through a jump host or VPN, that is a local policy, not an ALCF requirement.
Do you need X11 forwarding?
Many workflows have better alternatives: VS Code Remote - SSH for editing, Jupyter for notebooks, or VNC for persistent desktops. Use X11 forwarding for lightweight tools that require a display, such as xterm, quick ParaView tests, or graphical installers. For heavy visualization, launch ParaView or VisIt from a client — see Aurora Visualization, Polaris Visualization, and Sophia Visualization. For client-server setup, see ParaView on Aurora and ParaView on Polaris; for remote desktops, see VNC on Polaris.
Configure Your Local SSH Config File¶
Edit the SSH config file on your local machine, not on the ALCF system. This file controls how your local ssh behaves.
- macOS / Linux:
~/.ssh/config - Windows (OpenSSH):
C:\Users\<username>\.ssh\config
Set permissions so only you can read and write it:
Recommended ALCF example using one block for multiple hosts. Replace <username> with your ALCF username. %h expands to the host you typed (aurora, polaris, or crux), so you do not need a separate HostName per system:
Older OpenSSH
Comments after an option need OpenSSH 8.5 or newer. On older clients, such as RHEL 8 or Windows 10's built-in OpenSSH, put each comment on its own line or delete it. Check your version with ssh -V.
Create the multiplex directory once if it does not exist (the ControlPath directory must exist):
Then connect with the short name:
Disable forwarding for one connection without editing the file:
Placeholder names
Commands run on your laptop use <username> as a placeholder. $USER there is your local username, not your ALCF username, so keep <username> in those examples. In commands run on an ALCF login node, $USER or $HOME already have the right values.
About ControlMaster / ControlPersist
ControlMaster auto reuses one authenticated connection for additional tabs to the same host so you authenticate only once. ControlPersist 45m keeps the master open for 45 minutes after the last session closes. ControlPath is where the socket lives — %d is your home directory, and %C gives each connection its own socket, named from a hash of the host, port, and username, so ssh polaris never reuses an open Aurora connection.
The OpenSSH client built into Windows does not support ControlMaster/ControlPersist/ControlPath — on Windows, remove those three lines and keep ForwardX11/ForwardX11Trusted. They are compatible with current macOS and Linux OpenSSH.
Per-System Examples¶
These snippets are interchangeable. Add the ones you use to the same ~/.ssh/config file. See the hostnames for each system on its Getting Started page: Aurora and Polaris.
If you do not want a config file, pass the flag each time (trusted forwarding is recommended for ALCF hosts):
The same pattern applies to other ALCF systems. Use the hostname listed in the system documentation:
X11 Forwarding¶
X11 forwarding lets a graphical application started on an ALCF login node display on your local machine. It is optional — configure it only if you need lightweight X clients. For editors, notebooks, or persistent desktops, prefer VS Code Remote - SSH, Jupyter, or VNC (see VNC on Polaris). For visualization, prefer client-server ParaView/VisIt — see Aurora Visualization, Polaris Visualization, and Sophia Visualization.
Prerequisites on Your Local Machine¶
Install a local X server. You need this only where you sit, not on Aurora or Polaris. On Windows, start it before you connect with ssh -X or ssh -Y; on macOS, XQuartz starts when needed.
Download the installer from XQuartz and run it, then restart your Mac so DISPLAY is set. Alternatively, if you use Homebrew:
After install, restart your local machine and verify that the display variable has been set.
Verify xauth and DISPLAY locally before connecting:
XQuartz does not need to be running before you connect: DISPLAY is set in every new terminal, and the first X application that uses it starts XQuartz. If echo $DISPLAY prints nothing, log out and back in, or restart, after installing XQuartz.
Most Linux desktops already run an X server or XWayland. No extra install is needed. Verify DISPLAY locally:
Check that xauth exists:
Use an X server implementation:
- MobaXterm (recommended) has a built-in X server and enables X11 forwarding by default. Check Settings > Configuration > X11 > X11 Forwarding is enabled.
-
VcXsrv or Xming with the built-in OpenSSH client or PuTTY. In PuTTY, enable Connection > SSH > X11 > Enable X11 forwarding. With OpenSSH on Windows, use the same
ssh -Xflags and~/.ssh/configfile atC:\Users\<username>\.ssh\config, without the threeControllines, which Windows OpenSSH does not support. Windows OpenSSH requests X11 forwarding only whenDISPLAYis set, and the X server does not set it, so set it in PowerShell before you connect (:0.0is the X server's default display):
Remote side requirements are already present on ALCF login nodes: xauth is installed and sshd allows forwarding. If ssh -v -X reports X11 forwarding request failed, try a different login node and contact support with the verbose output.
X11 Forwarding Options¶
| Mode | Command-line flag | ~/.ssh/config setting | When to use |
|---|---|---|---|
| Enable trusted forwarding | ssh -Y <username>@aurora.alcf.anl.gov | ForwardX11 yes and ForwardX11Trusted yes | Recommended for ALCF systems. Allows full X operations. |
| Enable untrusted forwarding | ssh -X -o ForwardX11Trusted=no <username>@aurora.alcf.anl.gov | ForwardX11 yes and ForwardX11Trusted no | Fallback if you prefer stricter X security controls. |
| Disable forwarding | ssh -x <username>@aurora.alcf.anl.gov | ForwardX11 no | Override a config that enables forwarding for a single connection. |
-X alone does not turn off ForwardX11Trusted yes from your config, and some Linux distributions make trusted forwarding the default, so add -o ForwardX11Trusted=no for untrusted forwarding. A new session through an open shared connection (ControlMaster) uses the DISPLAY and X11 settings of the session that opened it, whatever flags you pass.
Use trusted forwarding for ALCF hosts
ALCF recommends trusted forwarding (-Y / ForwardX11Trusted yes) for ALCF login nodes. It avoids failures with some X toolkits. Scope it to ALCF hosts only — never set ForwardX11 yes or ForwardX11Trusted yes for Host *. A forwarded session lets the remote host interact with your local display until you disconnect.
You can inspect what SSH negotiated:
No output about X11 means forwarding was not requested (check your config and flags). X11 forwarding request failed on channel 0 means the server side refused it.
Verify That Forwarding Works¶
After connecting with ssh -Y, check DISPLAY on the remote host. It should be set by SSH to a localhost:10.0-style value, not empty and not :0:
If DISPLAY is empty, you connected without forwarding. Exit and reconnect with -Y, or check the ForwardX11 line in ~/.ssh/config. If you use the ControlMaster settings above, first close the shared connection with ssh -O exit aurora (or the host you connected to); otherwise the new session reuses it and still has no forwarding.
Open a simple X terminal to confirm the display forwards. Close it with the window button or ++ctrl+c++:
If the xterm window appears on your local screen, forwarding works. Test again after adding the SSH config entry to confirm it applies without flags.
Forwarding to Compute Nodes¶
You cannot SSH directly from your local machine to a compute node. You must first SSH to a login node, then hop to the compute node from there while your allocation is active.
Most visualization work should use a client-side launcher (ParaView on Aurora, ParaView on Polaris, VisIt on Aurora, VisIt on Polaris) or VNC on Polaris rather than X11 forwarding to a compute node. If you have an allocation and must test X11 on a compute node, request an interactive job from the login node, then SSH-hop to the assigned node from that login session with X11 forwarding:
# from your local machine to the login node (with X11 forwarding)
ssh -Y aurora
# then, from the login node to the compute node assigned to your job
ssh -Y <hostname>
The compute-node hostname is provided by your scheduler job output (for example, in qstat or the interactive-job startup message). Do not attempt to SSH to compute nodes from outside ALCF or without an active allocation.
Consult the system-specific running-jobs pages for interactive syntax: Aurora and Polaris.
Troubleshooting¶
cannot open display:orNo protocol specified— X server not running locally, or you connected without-Y. Start XQuartz or your Windows X server first, then reconnect withssh -Y. On macOS, ifecho $DISPLAYprints nothing locally, log out and back in after installing XQuartz.X11 forwarding request failed on channel 0— remotexauthmissing or admin disabledX11Forwarding. Try another login host. Capturessh -v -Youtput and include it in a ticket to Support.xauth: file /home/$USER/.Xauthority does not exist— usually harmless; SSH creates it. If forwarding still fails, checkxauth liston both ends.-
Authorization required, but no authorization protocol specified— stale local~/.Xauthority. On your local machine, regenerate it and reconnect:
Security Notes¶
- Trusted forwarding (
ForwardX11Trusted yes) is recommended for ALCF hosts and is set in the example above. Do not setForwardX11 yesorForwardX11Trusted yesforHost *— scope both to ALCF hosts only (Host aurora polaris crux). A forwarded session lets the remote host interact with your local display until you disconnect, so log out when done. ForwardAgentis unrelated to X11. Leave itnounless you have a specific jump-host workflow that requires agent forwarding.ControlMaster/ControlPersistreuse one authenticated connection. KeepControlPathunder~/.ssh/withchmod 700 ~/.sshso only you can access the socket. RemoveControlMaster/ControlPersist/ControlPathon systems where they are unsupported.- If you use VS Code Remote - SSH for most work, keep its SSH config entries separate from X11 entries or note which hosts enable forwarding so you do not unintentionally forward everywhere. See VS Code Remote - SSH for its example config.