Switch to a single server-side shell executable

Now it's compatible with ssh's force_command.

Also, add some basic borked transmission detection to put_db.