How to transfer files between two remote servers

When files need to be transferred between two servers, it is difficult to use FTP software (FileZilla).

Use scpcan solve this problem, generally LInux comes with scp

scp command introduction

scp 本地用户名@IP地址:文件名1 远程用户名@IP地址:文件名2

[Local user name@IP address:] can not be entered

copy files

Copy the current file to the remote server:

scp /home/a.txt [email protected]:/home/

Then you will be prompted to enter the root password of 192.168.0.8, and then the copying and transmission will begin.

copy folder

Copy testthe folder to the remote server homepath

scp -r /root/home2/test [email protected]:/home/

insert image description here

Guess you like

Origin blog.csdn.net/no_say_you_know/article/details/128812580