秘钥登录远端服务器

rsync -avze 'ssh -i ./id_rsa' root@remoteIp:/xx/remotefile.txt ./localpath

(./id_rsa为本地秘钥路径)

rsync文档

 

用户名/密码登录远端服务器

1.从远程ubuntu主机拷贝文件/文件夹到本地(scp)

  scp -r username@remoteIp:/xxx/remotefile.txt  ./localpath   -->输入密码

2.从本地向远程ubuntu主机拷贝文件/文件夹(scp)

 scp -r localfile.txt username@remoteIp:/home/xxx/  -->输入密码

  

相关文章:

  • 2022-12-23
  • 2021-12-15
  • 2021-11-09
  • 2022-12-23
  • 2021-11-13
  • 2021-11-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2021-08-02
  • 2022-12-23
  • 2021-07-02
  • 2021-12-09
  • 2022-12-23
相关资源
相似解决方案