SecureCopy: Difference between revisions
Line 5: | Line 5: | ||
This command, when run from a terminal, will copy the file "source_file0.txt" from the local machine to the home directory of nexusstaff00 and give it the name "target_file0.txt". | This command, when run from a terminal, will copy the file "source_file0.txt" from the local machine to the home directory of nexusstaff00 and give it the name "target_file0.txt". | ||
[jayid07@dedsec | [jayid07@dedsec ~]$ scp source_file.txt jayid07@nexusstaff00:target_file.txt | ||
This command, when run from a terminal, will copy the file "source_file1.txt" from the user's NFS homedirectory on nexustaff00 into the current local directory and give it the name "target_file1.txt". | This command, when run from a terminal, will copy the file "source_file1.txt" from the user's NFS homedirectory on nexustaff00 into the current local directory and give it the name "target_file1.txt". | ||
[jayid07@dedsec | [jayid07@dedsec ~]$ scp jayid07@nexusstaff00.umiacs.umd.edu:source_file1.txt target_file1.txt | ||
Note how the syntax of scp is very similar to that of the UNIX command cp with the addition of a hostname and username. | Note how the syntax of scp is very similar to that of the UNIX command cp with the addition of a hostname and username. |
Revision as of 17:35, 25 April 2022
Secure Copy (or SCP) is a way of copying data between two computers using SSH.
Using SCP
SCP (secure copy) is a command-line utility that allows you to securely copy files and directories between two locations. The following commands work under Red Hat Enterprise Linux, Ubuntu Linux, and macOS.
This command, when run from a terminal, will copy the file "source_file0.txt" from the local machine to the home directory of nexusstaff00 and give it the name "target_file0.txt".
[jayid07@dedsec ~]$ scp source_file.txt jayid07@nexusstaff00:target_file.txt
This command, when run from a terminal, will copy the file "source_file1.txt" from the user's NFS homedirectory on nexustaff00 into the current local directory and give it the name "target_file1.txt".
[jayid07@dedsec ~]$ scp jayid07@nexusstaff00.umiacs.umd.edu:source_file1.txt target_file1.txt
Note how the syntax of scp is very similar to that of the UNIX command cp with the addition of a hostname and username.
For UMIACS supported Windows hosts, WinSCP (available for download here) is already installed.