Linux System Administration
SSH - Secure Shell
Tunneling X over SSH
Put this line in /etc/ssh/sshd_config on the SSH server:
X11Forwarding yes
Then connect to the server with the
-X
flag:
$ ssh -X 12.222.238.129
Run this command to test that X forwarding is working:
# echo $DISPLAY
localhost:10.0
If it weren't, it would return a blank line.
Now you can run any X program installed on the server as though it were local.
$ xeyes
For security purposes, make sure that ~./Xauthority has permissions 600.
Prev
Page 17
Next