SSH附带的远程拷贝----SCP

scp 是加密远程拷贝,每次都是全量拷贝,效率不太高

基本语法:

scp - secure copy (remote file copy program)

参数说明

-P 端口

-r  递归目录

-p  保持属性

-l  limit 限制速度

推送文件

1 scp -P22 /etc/hosts daxian@192.168.70.126:/tmp/

推送目录

scp -P22  -rp /tmp/daxian/ daxian@192.168.70.126:/tmp/

拉取文件

scp -P22  -rp  daxian@192.168.70.126:/tmp/daxian /tmp/
原文地址:https://www.cnblogs.com/sky00747/p/8142998.html