X11 forwarding over ssh

ssh -XYC user@server xterm
The options are:
  1. X: enables x11 forwarding
  2. Y: enables trusted x11 forwarding
  3. C: compresses the communication
  4. xterm: can be substituted with other commands that are available on the server

X11 forwarding over multiple ssh hops

Suppose you do not have direct ssh access to server2. You can access server2 via server1 over ssh. (localhost => server1 => server2)
  1. In terminal 1:
    ssh server1 -L2200:server2:22
  2. In terminal 2:
    ssh localhost -XYC -p2200 xterm
    It will run xterm on server2 and displays back to localhost.

No comments:

Post a Comment