SCP Files Over A Non-Standard Alternate Port

back to tech articles

I seem to rant often about changing the SSH port. Hmmm.

Today, I want to secure copy (scp) a file to the remote server where SSH accepts incoming connections on a non-standard port (anything other than 22).

Here’s the command:

$ scp -P 2222 /source/ jason@

And that is all there is to it.

There’s other ways to achieve this and avoid these alternate commands, such as changing the default SSH port number on your local machine, but where’s the fun in that?

Leave a Reply

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