Wednesday, February 10, 2010

How to copy files with SCP

1.Copy a file to another host: 

scp sourcefile user@host:/directory/TargetFile

2.Copying file from host:  

scp user@host:/directory/sourcefile TargetFile

Note that if the remote host uses a port other than the default of 22, you can specify it in the command.
For example, copying a file from host:

scp -P 2222 user@host:/directory/SourceFile TargetFile

No comments:

Post a Comment