What is SCP command?
SCP commands are used to securely copy files and directories. 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 [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.