XDMCP connection through SSH tunneling

Since Xmanager is an X server, the remote X applications such as CDE, KDE and Gnome must be able to connect back to your PC. This makes it difficult to use XDMCP connection if your PC is in a private network.
However, you can still run your remote desktop session through SSH tunnel. There are two steps:

  1. Creating an SSH tunnel in Xshell.
  2. Creating an XDMCP session that uses SSH tunnel.


Note

Before you start, please make sure the SSH server on the remote host has X11Forwarding enabled.


Setup the configuration file in the following table.


SSH serverConfig fileSetup
OpenSSH/etc/ssh/sshd_configX11Forwarding yes
SSH.COM/etc/ssh2/sshd2_configAllowX11Forwarding yes


After setting the value, restart SSH daemon.



Step 1. Creating an SSH tunnel in Xshell

  1. Open Xshell.

    Note

    For more information about Xshell, please refer to our Xshell product page.

  2. If the Sessions dialog box does not automatically opens up, click Open on the Flie menu.
  3. In the Sessions dialog box, right click on the session that connects to your remote host, and then click Properties.

     

  4. In the Category menu, Click Tunneling. 



  5. In the TCP/IP Forwarding section, click Add. 
    RESULT: Forwarding Rule dialog box opens. 



  6. In the Type list, select Incoming (from remote to local).
  7. For Source Host, enter the "localhost".
  8. In the Listen Port field, enter "6020". 
    Note: You can choose any number that is not in use.


  9. In the Destination Host field, enter "localhost".
  10. In the Destination Port field, enter "6020". 
    Note: To get the Xamanger display number, subtract 6000 from the Destination Port number. In this example, the local display number is 20. We recommend using a number between 6020 and 6255.


  11. Click OK to save the changes.


Now, you are ready to create a secure SSH tunnel for XDMCP connection. Open the session and go to the next step in Xmanager. 

Step 2. Creating an XDMCP session that uses SSH tunnel

  1. Open Xmanager.
  2. In the Tools menu, click Options. 
    RESULT: Options dialog box opens. 



  3. In the New Address, enter the IP address of the remote host, and then click Add.
  4. Click OK to save the change. Now you should see a dynamic session icon of the remote host on Xmanager. 



  5. Right click on the remote host icon.
  6. In the context menu, click Save As. 

  7. Right click on the new session and click Properties. 
    RESULT: Properties dialog box opens. 



  8. In the Proxy section, select Use following connection address.
  9. In the Host box, enter "0.0.0.0".
  10. in the Port Number box, enter "6020". 

    Note

    If you did not use 6020 for the Listening Port as above 1. Creating an SSH tunnel in Xshell, use the number you have used instead.

  11. Click the X Server tab. 



  12. Clear Allocate display number automatically.
  13. In the Display Number box, enter "20".

    Note

    If you did not use 6020 for the Destination Port as above 1. Creating an SSH tunnel in Xshell, use the last 3 digits of that number. For example, enter 230 if you used 6230 for the Destination Port.

  14. Click OK to save the change.
  15. Double click on the session you have just created.