X11 Forwarding with SSH

xorg
Here is how to configure X11 forwarding with ssh.
Takes under a minute to configure:

1. On the SERVER: set “X11Forwarding yes” in your

	/etc/ssh/sshd_config

2. On the SERVER in the USER’s home dir:

	sudo rm -f .Xauth*

3. On the client:

	ssh -2 -4 -C -X -v USER@SERVER

4. Once logged in to the SERVER run “xclock” to confirm

done :)

5 comments

  1. I am trying to do what is suggested, however on my school box “sshd_config” is protected. Any thoughts?

  2. unprotect it :)

    do: sudo vi sshd_config

    or find someone who has permissions to do so

  3. Thank you – very precise and short.
    Tool me under 3 minutes – am I slow?
    But it does really what it supposed to, that is cool!

  4. You can also use the following command

    ssh hostname -X

    the X switch tells ssh to forward X11 info for that session. It can be done without changing the sshd_config file.

tell me something...
  1. (required)
  2. (valid email - optional)
  3. Captcha
  4. (required)