Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Every time I initiate an ssh connection from my Mac to a Linux (Debian) I do get this warning:

No xauth data; using fake authentication data for X11 forwarding.

This also happens for tools that are using ssh, like git or mercurial.

I just want to make a local change to my system in order to prevent this from appearing.

Note: I do have X11 server (XQuartz 2.7.3 (xorg-server 1.12.4)) on my Mac OS X (10.8.1) and it is working properly, I can successfully start clock locally or remotely.

share|improve this question
What command are you using to ssh? – DerfK Aug 30 '12 at 14:43
@DerfK just ssh hostname but in my ~/.ssh/config I added ForwardX11 yes some time ago. Still this is something that I do want to have there. – sorin Aug 30 '12 at 14:45
up vote 12 down vote accepted

Found the cause, my ~/.ssh/config was incomplete, you need both:

Host *
    ForwardAgent yes
    ForwardX11 yes

My mistake was that I included only the ForwardX11 option.

share|improve this answer
I'm not sure why this is needed/relevant. ForwardAgent is used to allow keys cached in ssh-agent to pass through multiple nested SSH connections. It should not have any relevance to X11. And fwiw, according to some, it's not a good idea security-wise:… – underscore_d Sep 24 '15 at 21:08

As noted, it seems that xauth on OS X Yosemite has regressed to an old version that doesn't work with XQuartz's $DISPLAY setting:

% xauth -V
% xauth generate $DISPLAY .
xauth: (argv):1:  bad display name "/private/tmp/" in "add" command
share|improve this answer
I tested the same lines on OS X 10.11, and I do not get any error. Still same version of XQuartz. – sorin Mar 1 at 11:48

There is a bug in MacOS at the moment. I came across this too. The fix for me involved adding the following to my .bash_profile

dispdir=`dirname $DISPLAY`
dispfile=`basename $DISPLAY`
if [ -e $DISPLAY -a "$dispfile" = "org.x:0" ]; then
  mv $DISPLAY $dispnew
export DISPLAY=$dispnew

Essentially the name for the file pipe associated with your X root can't be handled correctly, and thus needs correction. :-)

share|improve this answer
I doubt this would solve the error in GUI OS X apps, like SourceTree. – sorin Mar 1 at 11:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.