【CentOS 7】scp示例

1,从远端拷贝到本地 /tmp路径

root@raspberrypi:/download/api_weather# scp root@123.207.xxx.xxx:/xxx/* /tmp

2,从本地拷贝到远端 /tmp路径

root@raspberrypi:/download# ll
总用量 460
drwxr-xr-x 2 root root   4096 12月 18 17:15 api_weather
-rwxrwxrwx 1 root root 466534 8月  28  2017 phddns_rapi_3.0.1.armhf.deb
-rw-r--r-- 1 root root      0 12月 18 17:19 test.php
root@raspberrypi:/download# 
root@raspberrypi:/download# scp test.php root@123.207.xxx.xxx:/tmp
root@123.207.xxx.xxx's password: 
test.php                                                                                           100%    0     0.0KB/s   00:00                   
原文地址:https://www.cnblogs.com/BH8ANK/p/10138533.html