Similarly, I was trying scp command to copy a file from another server running on a port other than default one.. but I tried one with usual convention
scp [email protected]:/var/www/[file name] -p [port].
But didn’t work
It must be
scp -P [port] [email protected]:/var/www/[file name] .
Bit odd right?
scp from a remote server running on non default ssh port