- Make sure you have
xauth
installed. (See:xauth info
orxauth list
) - On the server your
/etc/ssh/sshd_config
file should have these lines:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
- Make sure on client side you have
X server
installed. - On the client side your
~/.ssh/config
file should have these lines if not create new config file and add:
Host *
ForwardAgent yes
ForwardX11 yes
- Then to do X11 forwarding using SSH, you need to add
-X
to your ssh command, e.g.
ssh -v -X user@host
then verify that your DISPLAY is not empty by:
echo $DISPLAY
If it is, then having verbose parameter for ssh (-v), check for any warnings, e.g.
debug1: No xauth program.
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Some applications might require read or write permissions. Use the following command to do that.