Refactor SSH into separate class