What is the SCP command?
SCP is short for secure copy. SCP is a secure remote file copy command based on SSH login in Linux.
SCP command usage
SCP [-1246 bcpqrv] [-C cipher] [-F ssh_config] [-I identity_file] [-l limit] [-O ssh_option] [-P port] [-s program] [[[email protected] host1:] file1 [...] [[email protected] host2:] file2
Copy local files to the remote host
[Email protected]: file is separated by a colon.
$ SCP localfile [email protected]: // copy the local file to the remote/directory $ SCP localfile [email protected]: ~ // Copy the local file to the remote home directory
Copy the local folder to the remote host
-R indicates Recursion
$ SCP-r ABC [email protected]: ~
Copy remote files to a local device
SCP [email protected]: ~ /Awesome.txt./SCP-R [email protected]: ~ /Awesome.txt ./
Specified port
# SCP command port 4588scp-P 4588 [email protected]:/usr/local/sin. sh/home/Administrator
Use of SCP commands