% ssh -X -l userid remotehost
remotehost% /usr/openwin/bin/xclock
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 ssh with X11 forwarding option, -X, check your /etc/inet/hosts file for multiple localhost entries; and remove the unnecessary ones. For example, my
/etc/inet/hosts has the following entries when the xclock failed with an X11 connection rejected .. error.remotehost% cat /etc/inet/hosts
127.0.0.1 localhost
::1 localhost
10.2.211.150 sunfiret2000 loghost
Removing the 2nd line,
::1 localhost, fixed the issue._________________________
Technorati Tags: