Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 602 Bytes

scp.md

File metadata and controls

19 lines (15 loc) · 602 Bytes

SCP file transfer cheatsheet

Securely copy a file from a local machine to a remote machine in Linux

Note: use scp -r to copy entire directory and its content recursively.

scp ./transferring_file_name  remoteuser@remotehost:/remote/directory

Securely copy a file from remote machine to our local machine.

(Note: use scp -r to copy entire directory and its content recursively.)

scp user@remotehost:/home/user/remote_file_name ./local_folder

Preserving original file metadata during transfer

scp -p source_file user@hostname:destination_file