pavement

Scp

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
[[scp]] -- secure copy. Essentially it's copying files from one host to another with ssh encryption. The format is
+
[[scp]] -- secure copy. Essentially it's copying files from one host to another with ssh encryption. The format is:
 +
 
 
  scp user@host:/path/to/file user2@host2:/path/to/file2
 
  scp user@host:/path/to/file user2@host2:/path/to/file2
Here user@host is copying '''file''' to host2 and naming it '''file2'''. For details on encryption keys and other details, see the [[man]] page.
+
 
 +
Here user@host is copying '''file''' to host2 and naming it '''file2'''. You will need to use the -r flag if you want to scp recursively, for example if you wanted to copy a user's home directory:
 +
 
 +
scp -r /home/username user@remote.host:/home/username
 +
 
 +
... which would copy "username"'s home directory (and all the files and directories it contains) from the local machine to the machine at "remote.host".
 +
 
 +
For information on encryption and authentication, tunneling over ssh, or other details, see the [[man]] page.
 +
 
 +
[[Category:System Commands]]

Latest revision as of 17:28, 12 September 2004

scp -- secure copy. Essentially it's copying files from one host to another with ssh encryption. The format is:

scp user@host:/path/to/file user2@host2:/path/to/file2

Here user@host is copying file to host2 and naming it file2. You will need to use the -r flag if you want to scp recursively, for example if you wanted to copy a user's home directory:

scp -r /home/username user@remote.host:/home/username

... which would copy "username"'s home directory (and all the files and directories it contains) from the local machine to the machine at "remote.host".

For information on encryption and authentication, tunneling over ssh, or other details, see the man page.

Personal tools