How to copy files between different machines in Linux

Source: Internet
Author: User

How to copy files between different machines in Linux
Zookeeper

File Copying on different machines in Linux

 

1. Copy local files to a remote machine:

Scp/home/administrator/news.txt root@192.168.6.129:/etc/squid

Where:

/Home/administrator/absolute path of the local file
Copy news.txt to a local file on the server
Root log on to the remote server using the root user (other users with the same permissions can also be used)
IP address of the remote server 192.168.6.129 (domain name or machine name can also be used)
/Etc/squid: copy the local file to the path on the remote server

 

2. Copy files on the remote server to the Local Machine

# Scp remote@www.abc.com:/usr/local/sin. sh/home/administrator

Remote users can log on to the remote server (other users with the same permissions can also be used)
Domain Name of the remote server www.abc.com (the IP address of the server can also be used)
/Usr/local/sin. sh file to be copied to the local Remote Server
/Home/administrator copy the remote file to the local absolute path

 

Note:
1. If the remote server firewall has special restrictions, scp must go through the special port. The specific port used depends on the situation. The command format is as follows:
# Scp-p 4588 remote@www.abc.com:/usr/local/sin. sh/home/administrator
2. When using scp, pay attention to whether the user has the permission to read the corresponding files on the remote server.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.