Securely transfer files between two Unix PCs with SCP This note was created on 2020-01-01 This note was last edited on 2023-01-31 Deprecation warning: scp is deprecated, because "the scp protocol outdated, inflexible, and not readily fixed". Please consider using rsync instead. Source 1: https://lists.mindrot.org/pipermail/openssh-unix-dev/2019-March/037672.html Source 2: https://lwn.net/SubscriberLink/835962/2064b65b35d8ee12 "scp" utility allows files to be copied to, from, or between different hosts. It uses "ssh" for data transfer and provides the same authentication and same level of security as ssh. === Usage === Copy the specific file from a remote host to the local host: $ scp username@remotehost:/path/to/ /path/to/local/directory Copy the specific file(s) from the local host to a remote host: $ scp username@remotehost:/path/to/remote/directory Copy the specific directory from the local host to a remote host: $ scp -r username@remotehost:/path/to/remote/directory Copy the specific file from a one remote host to another: $ scp username1@remotehost1:/path/to/remote/directory/ username2@remotehost2:/path/to/remote/directory/ Copy multiple files from the local host to a remote host: $ scp username@remotehost:/path/to/remote/directory Copy the multiple files from a remote host to the local host: $ scp username@remotehost:/path/to/\{,,\} /path/to/local/directory