This gets rid of a lot of the old hacks, and also updates the script to use
dtach to make the socket, so that the user doesn't have to mess around with
~/.ssh settings. A good future enhancement would be to make this (a) optional,
and/or (b) optionally use tmux/screen.