% ssh -X -l userid remotehost
X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown).
If you encounter
X11 connection rejected because of wrong authentication
error after logging to an UNIX/Linux host through
with X11 forwarding option,
, check your
file for multiple
entries; and remove the unnecessary ones.
For example, my
has the following entries when the
failed with an
X11 connection rejected ..
remotehost% cat /etc/inet/hosts
10.2.211.150 sunfiret2000 loghost
Removing the 2nd line,
, fixed the issue.