I have a list of nodes, that are accessible only through a bastion server.
On these nodes, I would like to execute commands in parallel. So, I had been trying to use ssh -J
flag or, respectively, the ssh_config ProxyJump
option in combination with parallel ssh pssh
.
To speed up re-connections, I am using ssh multiplexing
ControlMaster auto
ControlPersist 60m
ControlPath /tmp/ssh-%i@%l_%r@%h:%p
However, something like
pssh -O ProxyJump=USERNAME@bastion.fqdn -p 5 -l root -h /tmp/nodes.lst 'echo $HOSTNAME'
fails and runs into timeouts.
Hard-wiring the node list in the ssh config is not really feasible, so that I am depending on a commandline compatible solution.