Instead of holding the connection open for the duration of the application,
open a fresh connection for each command, and close it immediately after the
command completes. This may reduce the risk of having connections hang around
for a while, if the JVM terminates unexpectedly (e.g., if the ssh session gets
killed and the console goes away).