Scp
From FreeBSDwiki
(Difference between revisions)
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 | + | |
+ | 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 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]] |
Revision as of 16: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 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.