Differences
This shows you the differences between two versions of the page.
— | linux:shell_commands:copy_over_ssh [2019/10/31 09:05] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Copying Files over SSH ====== | ||
+ | <code bash Copy the file “file.txt” from a remote host to the local host.>$ scp user@remote.host: | ||
+ | <code bash Copy the file “file.txt” from the local host to a remote host.>$ scp file.txt user@remote.host:/ | ||
+ | <code bash Copy the directory “dir1” from the local host to a remote host’s directory “dir2”.> | ||
+ | <code bash Copy the file “file.txt” from remote host “remote.host1” to remote host “remote.host2”.> | ||
+ | <code bash Copy the files “file1.txt” and “file2.txt” from the local host to your home directory on the remote host.>$ scp file1.txt file2.txt user@remote.host: | ||
+ | <code bash Copy the file “file.txt” from the local host to a remote host using port 2222.>$ scp -P 2222 file.txt user@remote.host:/ | ||
+ | <code bash Copy the file “file.txt” from the local host to a remote host’s home directory. Preserve the modification and access times, as well as the permissions of the source-file in the destination-file.> | ||
+ | <code bash Copy the file “file.txt” from the local host to a remote host’s home directory. Increase SCP speed by changing the cipher from the default AES-128 to Blowfish.> | ||
+ | <code bash Copy the file “file.txt” from the local host to a remote host’s home directory. limit the bandwidth used by SCP command to 100 Kbit/ | ||
+ | <code bash Copy multiple files from the remote host to your current directory on the local host.>$ scp user@remote.host: |