Refactoring in ssh factory classes.