I did it this way instead of using mktemp because
a) mktemp would have created a different filename on every host, which would
make the client side logic much more confusing
b) mktemp isn't guaranteed to be available everywhere, so we're not losing much
by assuming /tmp exists.
Had to jump through some hoops to kill the remote cluster reliably. Not all ssh
server implementations respect signals, so in order to kill the cluster, we
request a pty for the ssh session. This allows us to send the byte 0x03 which is
effectively the same has hitting Ctrl-c in an interactive ssh session. With a
pty, just closing the session also seems to kill the remote process.