|
|
@ -73,14 +73,15 @@ ssh:open() { |
|
|
|
esac |
|
|
|
shift |
|
|
|
done |
|
|
|
"${ssh_cmd[@]}" -o ControlPath=/tmp/ssh-control-master-${master_pid} \ |
|
|
|
full_cmd=( |
|
|
|
"${ssh_cmd[@]}" |
|
|
|
-o ControlPath=/tmp/ssh-control-master-${master_pid}-$hostname \ |
|
|
|
-o ControlMaster=auto -o ControlPersist=900 \ |
|
|
|
-o ConnectTimeout=5 -o "StrictHostKeyChecking=no" \ |
|
|
|
-o ConnectTimeout=5 -o StrictHostKeyChecking=no \ |
|
|
|
"${ssh_options[@]}" \ |
|
|
|
"$hostname" "$@" -- true || { |
|
|
|
err Failed: ssh -o ControlPath=/tmp/ssh-control-master-${master_pid} \ |
|
|
|
-o ControlMaster=auto -o ControlPersist=900 \ |
|
|
|
"$hostname" "$@" -- true |
|
|
|
"$hostname" "$@" -- true) |
|
|
|
"${full_cmd[@]}" </dev/null >/dev/null 2>&1 || { |
|
|
|
err "Failed: ${full_cmd[*]}" |
|
|
|
return 1 |
|
|
|
} |
|
|
|
trap_add EXIT,INT 'ssh:quit "$hostname"' |
|
|
|