Editing Scp

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{lc}}
 
 
[[wikipedia:Secure copy]] (<code>scp</code>) is a means of securely transferring computer files between a local host and a remote host or between two remote hosts. scp implements a [[progress]] bar to estimate transfers.
 
[[wikipedia:Secure copy]] (<code>scp</code>) is a means of securely transferring computer files between a local host and a remote host or between two remote hosts. scp implements a [[progress]] bar to estimate transfers.
  
 
http://man7.org/linux/man-pages/man1/scp.1.html
 
http://man7.org/linux/man-pages/man1/scp.1.html
  
scp help
+
== Example ==
usage: scp [-346ABCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]
+
  scp USERNAME@SERVER:/tmp/FILE ./
            [-J destination] [-l limit] [-o ssh_option] [-P port]
 
            [-S program] source ... target
 
 
 
== Examples ==
 
  scp your_username@your_server:/tmp/FILE ./
 
scp -r your_username@your_server:/path/to/your/remote/folder ./
 
scp -r [[-P]] 1234 your_username@your_server:/path/to/your/remote/folder ./
 
 
 
scp your_username@your_server:/tmp/FILE ./
 
 
  USERNAME@SERVER's password:
 
  USERNAME@SERVER's password:
 
  Could not chdir to home directory /home/USERNAME: No such file or directory
 
  Could not chdir to home directory /home/USERNAME: No such file or directory
 
  protocol error: mtime.sec not present
 
  protocol error: mtime.sec not present
  
  scp USERNAME@SERVER:/tmp/your_folder ./
+
  scp -r .../...
scp: /tmp/your_folder: not a regular file
 
 
 
[[scp -r]] USERNAME@SERVER:/tmp/your_folder ./
 
scp: /tmp/your_folder/your_file: Permission denied
 
  
 
== Security ==
 
== Security ==
Line 35: Line 21:
 
* Review security advisories related to <code>scp</code>: [[CVE]]-2019-6111<ref>https://nvd.nist.gov/vuln/detail/CVE-2019-6111</ref> related to <code>[[scp]]</code> tool and protocol allowing to overwrite arbitrary files in the scp client target directory
 
* Review security advisories related to <code>scp</code>: [[CVE]]-2019-6111<ref>https://nvd.nist.gov/vuln/detail/CVE-2019-6111</ref> related to <code>[[scp]]</code> tool and protocol allowing to overwrite arbitrary files in the scp client target directory
 
* <code>[[pv]] </dev/zero | ssh REMOTE_SERVER 'cat >/dev/null'</code>
 
* <code>[[pv]] </dev/zero | ssh REMOTE_SERVER 'cat >/dev/null'</code>
 
== News ==
 
* [[OpenSSH 9.0]] Aug 2022 https://www.openssh.com/txt/release-9.0 switches scp from using the legacy scp/rcp protocol to using the SFTP protocol by default
 
  
 
== Related terms ==
 
== Related terms ==
Line 45: Line 28:
 
* [[magic-wormhole]]
 
* [[magic-wormhole]]
 
* [[progress]]
 
* [[progress]]
* <code>[[scp -3]]</code>  
+
* <code>[[scp -3]]</code> -3      Copies between two remote hosts are transferred through the local host.  Without this option the data is copied directly between the two remote hosts.  Note that this option disables the progress meter.
* [[Resume transmissions]]: <code>[[rsync]] -P or --partial --progress</code>
+
* [[Resume transmissions]]
* [[uses: actions/upload-artifact]] in [[GitHub Actions]]
 
* [[GitLab CI: artifacts:]]
 
  
 
== See also ==
 
== See also ==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: