Fixed infinite loop when SSH auth fails