SSH Display Forwarding (X11)
Secure Shell can use a local X11/Xorg server to forward applications windows.
Dependencies
You'll need a local X11 server. Options include
- For macOS, Xquartz
- Prerequisites (Xwayland or Xorg) are likely already available when already on Linux or Windows Subsystem for Linux.
Setup
Use -Y or -X with your ssh connection command to enable display forwarding.
ssh -Y $USERNAME@$REMOTEHOST
You can make this the default in ~/.ssh/config using ForwardX11 and ForwardX11Trusted directives. Note: Host * is for all hosts. You might want to replace * with a single or list of specific ssh servers.
Host * # we don't need to encrypt X11 (faster) ForwardX11 yes ForwardX11Trusted yes
