Scp
From FreeBSDwiki
(Difference between revisions)
Line 7: | Line 7: | ||
scp -r /home/username user@remote.host:/home/username | 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". | + | ... 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. | For information on encryption and authentication, tunneling over ssh, or other details, see the [[man]] page. | ||
[[Category:System Commands]] | [[Category:System Commands]] |
Latest 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 (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.