% 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:
UNIX | Linux | X11 | Troubleshooting
I'd be interested in hearing more about this bug. Is ssh using IPv6 to connect to the server?
ReplyDeleteNo; IPv4, mrdeviant.
ReplyDeleteWhat versions of OpenSSH are running on the client and server? What does netstat say when you have the IPv6 localhost entry defined?
ReplyDeletefixed my bug. could you please explain the reason behind it
ReplyDelete