Skip to main content

Run X Applications via an SSH Tunnel

By Wednesday May 27th, 2015December 14th, 2015Features

Last time we discussed accessing remote hosts via Secure XDMCP. But what if your server has insufficient memory and you only need to run certain X applications, not an entire desktop environment. Using Xmanager, you can utilize the X11 forwarding of the SSH protocol to securely run X applications.

The SSH protocol not only secures the X11 connection but also makes it easy to connect to X applications beyond the NAT gateway, so a user from a private IP network can connect to a x client in public IP network without port forwarding.

As with Secure XDMCP, we will need to enable X11 forwarding service in the SSH server as follows:

SSH Server Config file Setup
OpenSSH /etc/ssh/sshd_config X11Forwarding yes
SSH.COM /etc/ssh2/sshd2_config AllowX11Forwarding yes

 

Now to get our X applications running we’ll have to go through the following steps:

  1. Run Xstart in the Xmanager folder and click New to create a new session.
  2. Enter a new session name, and click OK. I’ll name my session “xterm” as I will be running xterm
  3. In the Host box, enter the hostname or OP address of the remote UNIX/Linux host.
  4. In the Protocol box, select  SSH. Protocol specific options such as port and tim-out can be changed by clicking Setup.
  5. In the Username box, enter the user account. My username is “test.”
  6. Select and authentication type. I will be using password in this instance. Authentication specific options such as password and public key can be changed by clicking Setup.
  7. In the Execution Command box, enter the command that will be executed on the host. Major X applications usually only require the application name, but you may require the full path to the execution command.27
  8. Click Run and enter your password when prompted.
  9. Xterm, or any other X application is now up and running.
    28

 

Leave a Reply

5 × five =