Openssh breaks xauth

From: Christoph Weber-Fahr (
Date: 07/21/04

Date: 21 Jul 2004 11:22:18 -0700


for quite some time now I run into hassles with openssh and xauth.

Apparently, when doing X forwarding, openssh

- puts hostname/displayspec into the .Xauthority file
- puts localhost/displayspec into the DISPLAY environment variable

This means especially that you can't do any tricks in scripts with
    xauth extract - $DISPLAY | xauth -f somotherfile merge -

because xauth doesn't find $DISPLAY in your own .Xauthority any more.
(for some strange reason though, the X toolkit libs do)

I have noticed this behaviour with more recent versions of openssh
on both FreeBSD and Solaris Machines.

FWIW, Ylonen ssh1 does this correctly.

- is this a known problem ?
- is there a good reason for that or is this just braindead ?


Christoph Weber-Fahr