Fix SSH disconnect function.