This port forwarding configuration describes how to tunnel X over SSH. It uses X Server (available on Play Store) to forward remote X applications from the SSH server. Please adjust addresses and ports to suit your needs.


  • A Pro license for JuiceSSH, enabling Port Forwarding functionality.
  • An X Server on your Android device which is listening on port 6000.
  • An SSH server named which is listening on port 22.


  1. Create your SSH Connection
    1. In the full connection list, hit New Connection.
    2. Enter the Type: SSH
    3. Enter the Address:
    4. Enter the Port: 22
    5. Ensure the connection has a valid Identity containing a username and a password or private key.
    6. Add a Nickname and assign the connection to Groups if you wish.
    7. Hit Save, and test that your new connection connects successfully.

  2. Create your Port Forward Profile
    1. From the full connection list, swipe left and hit New Port Forward.
    2. Enter the following details:
      1. Enter the Name which you wish to identify port forwarding
      2. Connection: (or nickname)
      3. Mode: Remote
      4. Port (from): 6001 (or any other X-ports between 6000-6009 available and not busy on remote ssh server)
      5. Destination:
      6. Port (to): 6000
      7. Open in browser after connecting: no
    3. Hit Save

  3. Activate the Port forward profile and check for the active profile's notification.
  4. Start X Server.
  5. Activate SSH Connection.
  6. Start X application on SSH sever by means of command like this (for example):

    env DISPLAY=:1 xclock
    (Here DISPLAY=:1 corresponds to port number 6001, so DISPLAY=:2 corresponds to port number 6002 and so on.)

  7. Return to X Server window on your Android device and look at result.
  8. When finished, use the notification, home screen widget/shortcut or full port forward list to disable the profile again.

For more in-depth study about X servers and X clients, refer to documentation on site.