Transferring files on two Linux servers SCP

Source: Internet
Author: User
Tags ssh port

Upload the Ins.war on the 107 server to the 38 server-specific directory:

Scp/gxxj/apache-tomcat-7.0.78-ins/ins.war [Email protected]:/data/

Upload the Ins.war on the 107 server to the 45 server-specific directory:

Scp/gxxj/apache-tomcat-7.0.78-ins/ins.war [Email protected]:/var/tomcat-7/

Move the Tomcat folder on 38 to the 45 machine:

Scp-r/data/apache-tomcat-7.0.78-ins [Email protected]:/var/tomcat-7/

Note: Once you have entered the command, you will be prompted to enter "Yes" and enter the password for the target server account.

Conditions:

1, both servers are local area network (local area network transmission speed);

2, two server communication no problem;

3, no firewall.

Assume that ssh for A/b machine allows root login:

a:192.168.1.240

b:192.168.1.102

To upload a/root/abc.zip to B machine and put it in the/ABC directory, you can use the command on a machine:

scp/root/abc.zip [Email protected]:/abc/

If the SSH port is not the default 22, for example, port 1234, add-P parameter:

Scp-p 1234/root/abc.zip [Email protected]:/abc/

You can also use the command on the B machine:

SCP [Email protected]:/root/abc.zip/abc/



Transferring files on two Linux servers SCP

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.