祕鑰登陸遠端服務器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