Ask Different is a question and answer site for power users of Apple hardware and software. 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

I get Warning: No xauth data; using fake authentication data for X11 forwarding. when I do ssh to other machines from my OS X machine which has X-server installed.

echo $DISPLAY returns something like /tmp/launch-4eEyr6/org.macosforge.xquartz:0

Inside ~/.ssh/config I specified XAuthLocation xauth but I still get the errors.

If I replace the line with full path to xauth (/opt/X11/bin/xauth), I stop getting the errors but the problem is that I do share the ssh config file between several machines, so I cannot put a path that is specific to Mac on it.

I would prefer a solution that would not require me to create a symlink on Mac from /opt/X11/bin/xauth to /usr/bin/xauth.

share|improve this question

I see it's an old question but for the sake of Google, here is my answer.

On the Mac, you can create an alias in ~/.bashrc like so:

alias ssh='ssh-o "XAuthLocation=/opt/X11/bin/xauth"'

If you also share the .bashrc across both OS X and other unixy machines, you could add a little stanza to the .bashrc as follows:

if [ `uname` == 'Darwin' ]; then
    alias ssh='ssh-o "XAuthLocation=/opt/X11/bin/xauth"'
share|improve this answer

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.