Linux / UNIX: Speed up SSH X11 Forwarding
SSH X11 Forwarding can be slow, especially over long distances or low-bandwidth connections. To speed up SSH X11 Forwarding, you can make the following optimizations:
- Compression: Enable compression on the SSH connection by adding the
-Coption to thesshcommand.
$ ssh -C user@host- Forwarding optimization: To optimize the X11 forwarding, add the following line to the
~/.ssh/configfile on your client machine:
ForwardX11 yes
ForwardX11Trusted yes- Disable X11 forwarding: If you don't need X11 forwarding, you can disable it entirely by commenting out the following line in the
/etc/ssh/sshd_configfile on the server:
#X11Forwarding yes- Use a faster X11 implementation: If you are using X11 forwarding, consider using a faster X11 implementation such as XQuartz on MacOS or Xming on Windows.
- Use sshfs: Consider using sshfs to mount remote directories locally instead of X11 forwarding for a much faster experience.
