Scp command for file transfer between Linux servers

Source: Internet
Author: User
Tags scp command ssh port

Common commands for transferring files between Linux servers using the scp command: 1. Download the directory on the server to the specified directory on the currently logged-on server: scp-P port number-r user name @ Server IP:/directory name local directory name using instance: scp-P port number-r root@192.168.1.240: /zsk/hollykm/home/hollykm: copy the linux Server 192.168.1.240/zsk/hollykm directory to the/home/hollykm directory of the server you are currently logged on. Www.2cto.com remarks: the default SSH port is 22. If modified, it is changed to the modified port number. If the default port number is 22, no-P is required. -R indicates cyclic replication. 2. download the files on the server to the specified directory of the currently logged-on server and name: Use instance: scp root@192.168.1.240: /zsk/hollykm/test.txt/home/test_copy.txt copy the file/zsk/hollykm/test.txt on linux Server 192.168.1.240 to/home/on the login server and rename it as lsxy117 by test_copy.txt

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.