X11 Forwarding on OS X 10.8.2 – Mountain Lion

To get X11 forwarding to work on Mac OS X 10.8.2, you first need to install the XQuarz X window system, which seems to have been omitted in this release of OS X.

After downloading the XQuarz package, simply install it by double clicking the package icon. After the package is installed, you need to log out and back into your OS X machine.

Add your remove server to host:

On your Mac in iTerm:

$ sudo xhost + remote.server.name

Connect to your remote system with ssh:

On your Mac in iTerm:

$ ssh -X username@remote.server.name

Test X11 by running xclock or another GUI application like gcalctool.

On remote server:

$ xclock

Note when upgrading to Mavericks

After the upgrade to Mavericks, my xhosts settings were reset, and X11 forwarding no longer worked. This fix this you simply need to re-run the xhost command:

$ sudo xhost + remote.server.name


5 thoughts on “X11 Forwarding on OS X 10.8.2 – Mountain Lion

  • March 8, 2013 at 3:22 pm

    Hey Christoph,

    Thanks for posting this update here. this was a great help for me. Since I updated to OS X 10.8 and x11 was omitted, I needed this application to remotely run monitoring tools (export / forward displays) from some other Linux servers. FYI. Some people should be aware that the app won’t authenticate remotely if do not have security enable on the x11 security preferences.

    Best Regards,


  • May 12, 2013 at 10:27 pm

    This was a very helpful post. I could not get X11 forwarding working on my shiny new retina laptop, as all the other posts focused only /etc/sshd_config settings, and none mentions OSX no longer ships with X11. My error was “x11 forwarding request failed on channel 0”. Thanks again.

  • June 7, 2013 at 3:33 pm

    thank you. Explanation is simple and very clear.

  • March 1, 2016 at 5:39 pm

    I had to `apt-get install xauth` on the remote Ubuntu server I was trying to forward from (even though xeyes and X11 was installed, xauth was not).

Comments are closed.