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 user@RemoteServer:/var/www/[file name] -p [port].

But didn’t work

It must be

scp -P [port] user@RemoteServer:/var/www/[file name] .

Bit odd right?

scp from a remote server running on non default ssh port
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.