What is SCP command?
SCP stands for Secure Containment, and Procedure or Secure Copy Protocol. It securely copies files and directories between local and a remote system or between two remote system across the SSH connection. Here you will see, how to copy files from remote server to the local system using SCP commands.
It happens between hosts without starting an FTP session or logging into the remote system explicitly. The SCP command uses SSH to transfer data, so it requires a password or passphrase for authentication.
SCP command used to perform the following operation
scp [options] [email protected]_host:directory1/filename1 [email protected]_host:directory2/filename2
The above command syntax clearly shows that the source where the file actually presents and the destination place where should the file copy to. While using such SCP commands source and destination address should mention clearly to avoid any errors.
How to copy a file from remote server to the local system using SCP Command?
scp filename [email protected]: is used to copy a file from remote server to the local system using SCP command.