brockgr / csshx

Automatically exported from code.google.com/p/csshx
433 stars 75 forks source link

csshx does not work on IPv6 addresses specified on the command line #79

Open unxman1 opened 8 years ago

unxman1 commented 8 years ago

I tried using csshx on some IPv6 addresses for a cluster I am working on. It misinterprets the colon in the address fields as a port number. Since there are 5 colons per IPv6 address field, this will not work. Maybe need an IPv6 flag that ignores the colons and a port flag to specify the port. There is a work around. You can put the IPv6 addresses in your /etc/hosts file and connect to the systems by name instead of IP address.

Command used: Csshx --login root root@xxxx:yyyy:zzzz:1ea5:4fff:ffff:ffff:a07[d-e] root@xxxx:yyyy:zzzz:1ea5:4fff:ffff:ffff:a08[6-8] which failed with the following error(s)

$ history -d $(($HISTCMD-1)) && clear && exec '/opt/local/bin/Csshx' '--slave' '--sock' '/var/tmp/tmp.0.l44gDs' '--slavehost' 'root@xxxx:yyyy:zzzz:1ea5:4fff:ffff:ffff:a07[d-e]' '--debug' '0' '--ssh' 'ssh' '--ssh_args' '' '--remote_command' '' '--slaveid' '1' '--login' 'root'

Bad port 'yyyy:zzzz:1ea5:4fff:ffff:ffff:a07[d-e]' CHILD at /opt/local/bin/Csshx line 1256.

After I added the IPv6 addresses to /etc/hosts it worked when I used hostnames: Csshx --login root root@serverpool1[3-4] root@serverpool2[4-6]

carenas commented 7 years ago

could you see if the last version from https://github.com/carenas/csshx/ addresses this issue for you?

note that RFC3513 specifies that if a port is used, the IP should be enclosed within brackets ([]), so expansion will be broken in that case