Handle failed and timed-out ssh connections.