Click Below to subscribe

How to copy file & folder from one remote server to another remote server

SCP (secure copy) is a command-line utility that allows you to securely copy files and folders between two locations.

#from local to a remote server / from a remote server to remote server.

scp file username@remote:/destination_path
scp -r /folder username@remote:/destination_path


scp ultimate@
scp -r /images ultimate@

#from local between two remote servers.

scp username@source:/file_path username@destination:/destination_path
scp -r username@source:/folder_path username@destination:/destination_path

#from a remote server to local.

scp username@remote:/file_path /destination_path
scp -r username@remote:/folder_path /destination_path

few scp options:-

  • -P  - Specifies the remote host ssh port.
  • -p  - Preserve files modification and access time.
  • -q  - Use this option if you want to suppress the progress meter.
  • -r   - This option tells scp to copy directories recursively.

Leave Your Comment