SSH
The most common approach to visualization is by initiating an SSH connection with the ForwardX11 flag set. The most common flags are:
ssh -X someone@something.ip.address #ForwardX11
ssh -Y someone@something.ip.address #ForwardX11Trusted
ssh -XY somone@something.ip.address #ForwardX11 ForwardX11Trusted
This method can be used on Linux, MacOS(with XQuartz) and Windows(with Xming).
However, a more practically useful method is to modify the ssh
configuration file itself. The following snippet can be added:
Host *
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
XAuthLocation /opt/X11/bin/xauth # For a Mac with XQuartz
For Linux (and Windows with WSL 2) machines, which xauth
will provide the path for the XAuthLocation
variable. Now the user is free to connect directly:
ssh someone@something.ip.address # Reads the ssh configuration
A quick test to see if X forwarding is working is to type
xclock
which should open up a small clock gui showing the local time.