Using X Window Applications Via Network Through SSH
This article will tell you how to run an application on a remote computer and have its graphical user interface displayed on your local machine.
Presumption:
- Kanotix 2005-03 or newer
- locale computer's IP: 192.168.1.10/24 (only displaying X11)
- remote computer's IP: 192.168.1.2/24 (actually running X11 application)
Configuration:
- On the remote computer change in /etc/hosts.allow a line to add rights for ssh access: :code: ssh sshd : 192.168.1.0/24 : ALLOW # e.g. allow all local area network adresses to access the ssh server :code:
- Open a root shell and enter the command for establishing an ssh connection with X-Forwading:
(enter your root password when prompted for it)
- Run any X-Application in the shell, for example "firefox".
Remote access ssh with X-Forwarding from a Windows-PC:
- Download and burn the Cygwin XLiveCD∞
- Put CD into the CD-ROM tray of the Windows-PC and wait for the autorun. Click "continue" until a shell window pops up
- There, enter:
ssh -X username@xxx.xxx.xxx.xxx
Note: xxx.xxx.xxx.xxx is the IP of the linux remote computer or its URL (for example a dyndns.org account) and the username is of course one user account that exists on the remote machine.
- After successfull login, start "kmail" for example and check your mails!
- Important: make sure hosts.allow has an entry to allow access from PCs from other networks. If you are behind a NAT-Firewall or a router make sure port 22 is forwarded to your linux machine!