scp command with port number

If the remote server has the ssh daemon on a different port (the default is 22), then you must tell scp to use that particular port number using the “-P” option.

scp -r -P 1234 /path/to/file_destination root@IP:/path/to/file