Linux SCP remote File/directory Transfer

Source: Internet
Author: User
Tags ssh port vps server

Linux SCP remote File/directory Transfer

1. Get the files on the remote server

[Email protected]:/root/test. Tar.gz/home/test. tar.gz 

Upper Port Capital P is the parameter, 22 means change the port that connects SSH, if not change the default SSH port can not add this parameter. [email protected] test.com means to log on to the remote server www using the root user. test.com:/root/test.tar.gz represents a file on a remote server, and the last/home/test.tar.gz represents the path and file name saved locally.

2. Get the directory on the remote server

scp-r [email protected]:/root/testdir  /home/testdir/

The-r parameter indicates a recursive copy (that is, the files and subdirectories below the directory),/root/testdir/represents a directory on the remote server, and the/home/testdir/on the last side represents the path saved locally.

3. Upload the local file to the server

SCP  /home/upload.  tar.gz [email protected]:/root/upload. tar.gz 

Other common parameters are

-4 mandatory use of IPv4

-6 mandatory use of IPv6

-V is the same as-V in most Linux commands to show progress. Can be used to view connections, certifications, or configuration errors.

-C Enable to compress

Above is the Linux host to use SCP connection upload download file

Under win you can directly use the WinSCP to manage VPS Server files and more convenient

Linux SCP remote File/directory Transfer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.