Skip to content

Instantly share code, notes, and snippets.

@craigphicks
Created July 6, 2019 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigphicks/837ca648dee0ea45f071e35584334090 to your computer and use it in GitHub Desktop.
Save craigphicks/837ca648dee0ea45f071e35584334090 to your computer and use it in GitHub Desktop.
Forwarding `X11` over `ssh` without using `xauth`

Forwarding X11 over ssh without using xauth

  • local -- the local machine serving an Xserver.
  • remote -- the remote machine serving the application which drives the data going to the Xserver

Remote /etc/ssh/sshd_config:

X11Forwarding no
X11DisplayOffset 10
X11UseLocalhost yes

Remote ~/.Xauthority is empty or does not exist

On local:

Xephyr -ac -screen 1280x800 -br -reset   :2 &
DISPLAY=:2 ssh  -fR 6010:/tmp/.X11-unix/X2  user@remote "DISPLAY=:10 xeyes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment