![]() |
| Home | Company | Services | Mock exams | Contact us |
|
X11 forwarding over ssh tunnelThere are situations when we need to start a remote X11 client over an ssh tunnel. Below you will find two possible scenarios.Scenario 1: single hop connection - the client can reach the server directly. See fig.1 Fig. 1 In this scenario, the Desktop is running the X11 server. If Desktop is a windows workstation, X11 server can run over cygwin or exeed. On the client side (Server A) let's assume, for simplicity, that the X11 client is mozilla. To export mozilla from Server A to Desktop, you should follow the steps below: On Desktop: start cygwin startx (start X11 server on Desktop) xhost +ServerA (allow X11 clients from ServerA to connect to Desktop) ssh -R 6000:kuxonorg.dot5hostingmysql.com:6000 myuser@ServerA (forward requests comming to kuxonorg.dot5hostingmysql.com (on ServerA) port 6000 to Desktop port 6000) On ServerA: export DISPLAY=kuxonorg.dot5hostingmysql.com:0 (set the DISPLAY environment variable to locahost, ID 0) mozilla (start X11 client) As a result, the X11 client should be displayed on Desktop through the ssh tunnel. Scenario 2: multi hop connection - the client can't reach the server directly, extra steps are involved. See fig. 2
Fig.2
On
Desktop: On
ServerA: |
| Home Company Services Mock exams Contact |