可以使用scp
命令,scp
通过扩展cp
的语法,使用ssh
协议来跨系统copy文件
1.从另外一个系统(比如:服务器)拷贝文件到本系统(本机)
scp username@hostname:/path/to/remote/file /path/to/local/file
2.从本系统(本机)拷贝文件到另外一个系统(服务器)
scp /path/to/local/file username@hostname:/path/to/remote/file
3.从一个系统(服务器A)拷贝文件到另外一个系统(服务器B)
scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file
scp命令参数介绍
https://www.runoob.com/linux/linux-comm-scp.html