Redo SSH proxying

We now explicitly set a TERM variable, which makes things like apt-get less
irate. We also do the right thing with stderr and stdout echoing.