duncs / clusterssh

Cluster SSH - Cluster Admin Via SSH
https://github.com/duncs/clusterssh/wiki
890 stars 79 forks source link

cssh fails to start if there are multiple entries in xauth #120

Closed etam closed 4 years ago

etam commented 5 years ago

clusterssh version: 4.13.2.02 It failed to start with the following error:

$ cssh some_server
Connection to server failed -- (version 11.0)
Invalid MIT-MAGIC-COOKIE-1 key at /usr/lib/perl5/vendor_perl/5.28.1/App/ClusterSSH/Window/Tk.pm line 54.

The problem for cssh was that xauth had multiple entries:

$ xauth list
localhost/unix:0  MIT-MAGIC-COOKIE-1  <some_hash>
etam-komp/unix:0  MIT-MAGIC-COOKIE-1  <some_other_hash>
etam-komp.lan.golem.network/unix:0  MIT-MAGIC-COOKIE-1  <some_completely_different_hash>
$ env | grep XAUTH
XAUTHORITY=/home/etam/.Xauthority
XAUTHLOCALHOSTNAME=etam-komp.lan.golem.network

After I deleted localhost/unix:0 and etam-komp/unix:0 from xauth, cssh started properly.

duncs commented 4 years ago

This is a Tk issue as I do not do anything directly with X auth within this tool

jirib commented 3 years ago

I got the same on latest openSUSE Tumbleweed (clusterssh-4.16-1.5.noarch). Any idea how to solve this?

cssh --debug 9 -l root 192.168.122.189
Loading in config file: /home/jiri/.clusterssh/config
Loading in config file: /home/jiri/.clusterssh/config
Looking for xterm
Looking for xterm in /home/jiri/.asdf/shims
Looking for xterm in /home/jiri/.asdf/bin
Looking for xterm in /home/jiri/bin
Looking for xterm in /home/jiri/bin
Looking for xterm in /home/jiri/bin
Looking for xterm in /home/jiri/bin
Looking for xterm in /home/jiri/.local/bin
Looking for xterm in /home/jiri/bin
Looking for xterm in /usr/local/bin
Looking for xterm in /usr/bin
Found at /usr/bin/xterm
Connection to server failed -- (version 11.0)
Invalid MIT-MAGIC-COOKIE-1 key at /usr/lib/perl5/vendor_perl/5.32.1/App/ClusterSSH/Window/Tk.pm line 57.