Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


linux:shell_commands:copy_over_ssh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:shell_commands:copy_over_ssh [2017/11/06 15:22] (current)
tplecko created
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:​file.txt /​some/​local/​directory</​code>​ 
 +<code bash Copy the file “file.txt” from the local host to a remote host.>$ scp file.txt user@remote.host:/​some/​remote/​directory</​code>​ 
 +<code bash Copy the directory “dir1” from the local host to a remote host’s directory “dir2”.>​$ scp -r dir1 user@remote.host:/​some/​remote/​directory/​dir2</​code>​ 
 +<code bash Copy the file “file.txt” from remote host “remote.host1” to remote host “remote.host2”.>​$ scp user@remote.host1:/​directory/​file.txt user@remote.host2:/​some/​directory/</​code>​ 
 +<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>​ 
 +<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:/​some/​remote/​directory</​code>​ 
 +<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.>​$ scp -p file.txt user@remote.host:​~</​code>​ 
 +<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.>​$ scp -c blowfish file.txt user@remote.host:​~</​code>​ 
 +<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/​s.>​$ scp -l 100 file.txt user@remote.host:​~</​code>​ 
 +<code bash Copy multiple files from the remote host to your current directory on the local host.>$ scp user@remote.host:​~/​\{file1,​file2,​file3\} .</​code>​
linux/shell_commands/copy_over_ssh.txt · Last modified: 2017/11/06 15:22 by tplecko