The commonly used scp command-line utility does not accept the URL as a command-line argument, so it does not figure out which program you are using here. Having said that, the general way to specify the port number in the URL matches the host name:
scp:// root@host :3131/root/ids/rules.tar.gz ^^^^
If you have a scp utility that accepts a url, probably as you pointed it out.
If you use a typical scp command-line utility, you can run something like this:
scp -P 3131 root@host :/root/ids/rules.tar.gz .
But you are not actually using the url.
source share