Previously, if the port specified by the user or inventory was 22, then the ssh client port would be used instead. Fixes #3895