As BroSlow said, ssh -t
will solve the problem if using ssh
.
If using pdsh
via ssh
, I used the following:
export PDSH_SSH_ARGS_APPEND="-tt -q"
pdsh -w ${machine_list} -S -R ssh ${cmd}
PDSH_SSH_ARGS_APPEND
is used to append arguments to the ssh command generated by the pdsh
, as the name hints.