MAC通过终端上传文件到云服务器

2018 年 9 月 4 日 星期二
5

MAC通过终端上传文件到云服务器

测试连接

ssh连接测试

➜  ~ ssh root@193.112.11.172 -p 22
root@193.112.11.172's password: 
Last failed login: Tue Sep  4 16:31:38 CST 2018 from 180.101.185.159 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Tue Sep  4 16:31:01 2018 from 125.94.200.202
[root@hongdong ~]# ll
total 8
drwxr-xr-x 7 root root 4096 Sep  3 13:49 oneinstack
-rw-r--r-- 1 root root   65 May  1  2017 ReadMe

发送文件

➜  Downloads  scp /Users/huangjian/Downloads/live2d/* root@xxx.xxx.xx.xxx:/Downloads
root@xxx.xxx.xx.xxx's password:  //输入密码,无法查看
布洛尼亚.zip                                                 100%  968KB   5.5MB/s   00:00    
康娜.zip                                                       100% 1218KB   7.2MB/s   00:00    
时崎狂三.zip                                                 100% 1958KB   2.8MB/s   00:00    
纱雾.zip                                                       100% 1080KB   4.8MB/s   00:00    
芽衣.zip                                                       100% 8061KB   2.6MB/s   00:03    
血小板.zip                                                    100% 1343KB   2.3MB/s   00:00

要上传文件夹 scp后面跟 -r即可

下载文件

➜  Downloads scp root@193.112.11.172:/Downloads/index.html /Users/huangjian/Downloads
root@193.112.11.172's password: 
index.html                                                       100%   12     1.3KB/s   00:00    
➜  Downloads ll
total 27792
-rw-r--r--  1 huangjian  staff    12B  9  4 16:46 index.html

同上,要下载文件夹 scp命令后面跟 -r即可

  • Loading...
  • Loading...
  • Loading...
  • Loading...
  • Loading...
  • MAC通过终端上传文件到云服务器 - ctexthuang