SSH is a program for logging into a remote machine and for executing commands on a remote machine. It is possible to run X Window graphical applications over SSH also. X forwarding allows you to run remote X applications that open their windows on your local display.
To establish an X Window connection over SSH:
1. Make sure that openssh package has installed and ssh service is active on both server and client machines.
(OpenSSH is free version of SSH)
2. Login to server machine (remote computer) using SSH
and edit remote computer’s /etc/ssh/sshd_config file as remote root adding following lines and save.
3. Restart ssh service on remote machine by executing following command as remote root.
4. On client machine (your computer), edit /etc/ssh/ssh_config file as root adding following lines and save.
5. To establish SSH connection with configured remote machine, execute following command from an X Terminal Emulator.
ssh -Y remote_user_name@remote_machine
6. After logging into remote machine, execute below command to check the value of display variable in remote host environment.
If you do not see anything when typing above command, set value by executing:
Now try to launch an X application on remote machine from client machine, for example:
* /etc/ssh/sshd_config and /etc/ssh/ssh_config files have required lines for X11 forwarding in commented form as system default. Instead of adding new lines, just uncomment related lines and check parameters.
* You need to open port “22″ on remote network for WAN connections over SSH.