Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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
add comment

1 Answer 1

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"'
fi
share|improve this answer
add comment

Your Answer

 
discard

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.