SecureCopy: Difference between revisions
(Updated to remove Win7 hosts) |
No edit summary |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 2: | Line 2: | ||
==Using SCP== | ==Using SCP== | ||
The following commands work under | 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, macOS, and Windows. | ||
This command, when run from a terminal, will copy the file " | This command, when run from a terminal, will copy the file "source_file0.txt" from the current directory of the local machine to the home directory of the user on hostname.umiacs.umd.edu and give it the name "target_file0.txt". | ||
[username@hostname ~]$ scp source_file0.txt username@hostname.umiacs.umd.edu:~/target_file0.txt | |||
This command, when run from a terminal, will copy the file "source_file1.txt" from the home directory of the user on hostname.umiacs.umd.edu into the current directory of the local machine and give it the name "target_file1.txt". | |||
This command, when run from a terminal, will copy the file " | [username@hostname ~]$ scp username@hostname.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. | ||
For UMIACS supported Windows hosts, | For UMIACS supported Windows hosts, WinSCP (available for download [http://winscp.net/eng/download.php here]) is already installed. | ||
==Further Information== | ==Further Information== | ||
* [http://www.openssh.org/ OpenSSH] | * [http://www.openssh.org/ OpenSSH] | ||
* [http://winscp.net WinSCP] | * [http://winscp.net WinSCP] |
Latest revision as of 20:46, 15 October 2024
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, macOS, and Windows.
This command, when run from a terminal, will copy the file "source_file0.txt" from the current directory of the local machine to the home directory of the user on hostname.umiacs.umd.edu and give it the name "target_file0.txt".
[username@hostname ~]$ scp source_file0.txt username@hostname.umiacs.umd.edu:~/target_file0.txt
This command, when run from a terminal, will copy the file "source_file1.txt" from the home directory of the user on hostname.umiacs.umd.edu into the current directory of the local machine and give it the name "target_file1.txt".
[username@hostname ~]$ scp username@hostname.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.