9951 explained code solutions for 126 technologies


scpHow to use a different port when using SCP?


To use a different port when using SCP, you can use the -P option. For example, to use port 2222:

scp -P 2222 <source> <destination>

The -P option specifies the port to use for the connection.

  1. -P: Specifies the port to use for the connection.
  2. <source>: The file or directory to be copied.
  3. <destination>: The destination of the copied file or directory.

Helpful links

Edit this code on GitHub