I'm trying to connect to a number of hosts using pssh in combination with a jump host and ssh-agent key forwarding.
Unfortunately this fails quiet regular, but with different hosts failing on. So this is only an example which would look different next time:
 ~> pssh -h /tmp/hostfile -o /tmp/log -e /tmp/error/ -v uname -a [1] 13:51:18 [FAILURE] host1 Exited with error code 255 [2] 13:51:19 [SUCCESS] host2 [3] 13:51:19 [SUCCESS] host3 [4] 13:51:19 [SUCCESS] host4 [5] 13:51:19 [SUCCESS] host5 [6] 13:51:19 [SUCCESS] host6 [7] 13:51:19 [SUCCESS] host7 …. [16] 13:51:19 [SUCCESS] host16 When having a deeper look, I'm getting
ssh_exchange_identification: Connection closed by remote host ssh_exchange_identification: Connection closed by remote host on the host that failed. This looks much like the ssh-agent keyforwarding via jump host did not work in this particular scenario.
Inside my ~.ssh/config it looks like this:
ForwardAgent yes Host *.tld.foo User frlan ProxyCommand ssh tld-jump-host nc %h %p Host tld-jump-host HostName myhost.example.com User frlan ProxyCommand none Usually this is working. Now I'm wondering why starting at about 15 hosts sometime the key is not forwarded an dhow I can upgrade my configuration to prevent this from happening.