Skip to content

scp usage on Linux

备份远程文件

(远程——>本地)

scp -r 远程用户名@ip:文件绝对路径 本地绝对路径

还原远程文件

(本地——>远程)

scp -r 本地路径 远程用户名@ip:远程绝对路径

如果ssh端口号有变化,则使用-P参数指定端口号

scp -P port username@hostip:/dir

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback me#imzye.me, replace # with @
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Try my iOS App