4:47 PM SCP a secure copy program in Linux |
SCP is a program used to copy files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if they are needed for authentication.
Any file name may contain a host and user specification to indicate that the file is to be copied to/from that host. Copies between two remote hosts are permitted.
Format:
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 [...] [[user@]host2:]file2
For eg. To copy a file from your system to any other system, use below command
The above command will copy the file abc1.txt of home directory of host1 to the ~/test directory of host2
If you don't specify any directory on the destination host, the file will be copied to home directory of remote host. Lets say: See below command:
Some frequent options: -p It preserves modification times, access times, and modes from the original file. -r Recursively copy entire directories -c cipher
|
|
Related blogs
You may also like to see:
[2014-01-09] | [Open System-Linux] |
How to send a mail using unix/linux terminal? |
[2016-10-12] | [Open System-Linux] |
Remove Control M characters from a script or any file in Linux/AIX |
[2015-09-09] | [Open System-Linux] |
Some funny and cool commands in Linux |
[2019-09-27] | [Open System-Linux] |
How to generate private/public key from PEM file With PuttyGen |
[2014-02-19] | [Open System-Linux] |
Some unique and special commands in Linux |
Total comments: 0 | |