Fixing ssh bugs after private machine refactoring