Handle connection reset for ssh

Signed-off-by: Ken Barber <ken@bob.sh>