small step forward to refactor ssh/normal client