|
Written by Clint Christopher Canada
|
Ever needed a gui based program to run over a remote server? There are many ways to do this, but one nice way to do it is through ssh.
If you're looking for a nice tutorial for doing this, look no further... you've come to the right place.
How do we do it?
Here are the steps:
1. Make sure that X Forwarding is enabled on the remote ssh server. Add these lines to your sshd_config file located in the /etc/ssh directory:
X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes
DisplayOffset can be changed to whatever screen you desire (default is 10)
2. Restart your ssh server. This is done by running /etc/init.d/sshd restart for Fedora/RedHat based systems or /etc/init.d/ssh for Debian based systems. 3. If you're running ssh in a command line, type in the following:
ssh -l username -p 22 -X -C domainname.com Here are the meanings of the parameters: l - username p - port number of the server (not needed if your port address is standard) X - use X forwarding C - use compression. This allows better performance, especially if your remote server is quite far.
4. If you're using putty, set up X forwarding as shown here:

Also, enable compression here:

5. Connect to the server. When you do: #echo $DISPLAY your $DISPLAY variable should come up as: localhost:10.0
6. Fire up your local X server. On windows machines you may use Cygwin/X or my personal favorite X-deep/32 (there is a freeware version of this software, which is an older version, but you have to search through google to find it). Make sure you have the screen display set to :10 or whatever you set up in sshd_config.
7. To test if it works, type in the following in the remote server: #xterm &
If you see your xterm window up, congradulations! You've now got X Forwarding over ssh
|