Remote Linux Applications over SSH
Graphical applications can be run over an SSH connection. This is called ‘X11 Forwarding’ and requires an X server for Windows and a configuration of your SSH client in Linux, UNIX and Mac.
Setting up X11 on Windows
The X server that’s easiest to configure is Xming, which is what CSE-IT recommends. Other options include X-Win32 (commercial) and Cygwin (open source). Xming is installable on CSE Windows computers via the Software Center.
Xming Installation and Configuration
- If you're using a supported Windows workstation in the College, install Xming via the Software Center.
- If you're using a personal Windows computer, download Xming. Install Xming by running the setup.exe file and selecting “Next” for all of the installer prompts.
- After the package is installed, if Xming isn't already running, click on the icon created by the installation program in the Start menu.
- If you see a popup about your Windows firewall, set your desired firewall settings based on the networks your local system will be using and select "Allow access".
- You should see Xming's X icon in the system tray. Launch your SSH client.
- In your SSH client, verify that X11 forwarding is properly configured as outlined below under "Configure an SSH client with X11".
- Now you can open a connection to the remote machine and run X11 applications from it. 'xeyes' is a small, graphical Linux program that can confirm that X is working.
Configure an SSH client with X11
The following SSH clients have different ways of enabling X11 forwarding.
OpenSSH - Commonly used in Linux/UNIX and Mac terminals
- Add a ‘-X’ flag to your SSH command, such as '
ssh -X email@example.com'
- To make the change permanent in Linux, edit /etc/ssh/ssh_config and make sure that “ForwardX11” is set to “yes.”
PuTTY - Windows
- PuTTY is pre-installed on most CSE computers and is available in the Software Center or to download to your personal computer. Start the application.
- If you already have a session saved, load it now. In the category menu, click Connection -> SSH -> X11.
- Check ‘Enable X11 Forwarding’.
- In the category menu, click on Session. Under Host Name enter the name of the UNIX computer you would like to connect to.
- Set the Protocol to SSH. Under Saved Sessions type a name for this connection and click save, or save your new settings to an existing session. From now on you may double-click the name of this session and it will automatically begin connecting.