Fixed ssh bugs