Refactored ssh interface