Tunneling X through SSH

X is a very easy protocol to use in conjunction with SSH, at least if you've configured it appropriately. Ideally, both the client and the server should be configured to tunnel X sessions. To tell the SSH server to do so, be sure that the /etc/ssh/sshd_config file includes the following line:

X11 Forwarding yes

The equivalent line in the /etc/ssh/ssh_config file for the SSH client is as follows: ForwardX11 yes

In the case of the client, you can override a no setting by launching the ssh client with the -X option. Be sure that you pass an uppercase -X; the lowercase -x option disables

X forwarding!

Once you've enabled these options, a remote text-based SSH login automatically enables the use of X-based programs from the remote system, at least if you're running an X server locally. Referring to the six-step procedure presented earlier, in "Basic X Remote Logins," you can skip Steps 2, 4, and 6.

This procedure works very well with Linux SSH clients. Some SSH clients for non-Unix OSs may not tunnel X, though. If you use such a client, you might not be able to get this procedure to work. If so, you might want to try another SSH client.

0 0

Post a comment