ubuntu upload and download files

Linux file transfer command
SCP (Secure Copy)
  The scp command is the most convenient and useful command in SSH. Just imagine, to transfer files directly between two servers, just use the scp command to completely solve the problem. You can run #scp servername:/home/ftp/pub/file1 ./
on as root Of course, you can also use #scp /tmp/file2 servername:/boot to send the file /tmp/file2 on this machine to the /boot directory of another machine. And the entire transfer process is still encrypted with SSH.
  scp is secure copy, which is used for remote file copying. Data transmission uses ssh, and uses the same authentication method as ssh, providing the same security guarantee. Unlike rcp, scp asks you for a password or passphrase when authentication is required.
The simplest application example
  The simplest application is as follows:
  scp local user name@IP address: file name 1 remote user name@IP address: file name 2
  [local user name@IP address:] can not be input, may need to input remote user The password corresponding to the name.
  Several parameters that may be useful:
  -v Same as -v in most linux commands, used to display progress. Can be used to view connection, authentication, or configuration errors.
  -C Enable compression option .
  -P selects the port. Note that -p is already used by rcp.
  -4 Forcibly use IPV4 address.
  -6 Forcibly use IPV6 address.
  -r Recursively copy entire directories.
  For example -
  copy local files to remote machine
  scp /etc/lilo.conf [email protected]:/home /my
  will copy the local /etc/lilo.conf file to www.upsdn.net, the home directory of user my.
  ===================================================== ===
  For example:
  Copy the local file to the remote machine
  scp /etc/lilo.conf [email protected]:/home/k
  will copy the local /etc/lilo.conf file Go to net67.ee.oit.edu.tw, user k's home directory.
  Copy the file on the remote machine to the local
  scp [email protected]:/etc/lilo.conf /etc
  will copy the /etc/lilo.conf file in net67.ee.oitdu.tw to the local in the /etc directory.
  keep the properties from the source host file
  scp –[email protected]:/etc/lilo.conf /etc
  Here we must pay attention to whether the user's authority can read the remote file. If you want to know more about the use of scp, you can go to the scp manual.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326991664&siteId=291194637