秘钥登陆远端服务器ubuntu
rsync -avze 'ssh -i ./id_rsa' root@remoteIp:/xx/remotefile.txt ./localpath服务器
(./id_rsa为本地秘钥路径)ssh
rsync文档spa
用户名/密码登陆远端服务器ip
1.从远程ubuntu主机拷贝文件/文件夹到本地(scp)ci
scp -r username@remoteIp:/xxx/remotefile.txt ./localpath -->输入密码rem
2.从本地向远程ubuntu主机拷贝文件/文件夹(scp)文档
scp -r localfile.txt username@remoteIp:/home/xxx/ -->输入密码get