Linux command scp for copying remote files

Written By Smart| 15 August 2009| No Comment

SCP :  securely transferring computer files between a local and a remote host or between two remote hosts, using the Secure Shell (SSH) protocol.
The term SCP can refer to one of two related things, the SCP protocol.

command : scp

Description :

pies 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.

File names may contain a user and host specification to indicate that the file is to be copied to/from that host.  Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing ‘:’ as host specifiers.  Copies between two remote hosts are also permitted.

Example :

scp ~/filetansfer username@hostname:~/destionfolder


if you copy a directory use ‘-r’.

scp -r  ~/filetansfer username@hostname:~/destionfolder

Note : if you use -r does not care about symbolic links  even if it has already copied the file. This can
lead to scp copying an infinite amount of data and can easily fill up your hard disk.

Related Posts with Thumbnails

Share With Others

Leave your response!




Comment moderation is enabled. Your comment may take some time to appear.