Linux 机器之间 zssh, rz, sz互相传输

  |  
阅读次数
  |  
字数 274
  |  
时长 ≈ 2 分钟

服务器端安装lrzsz:

1
sudo  yum install lrzsz

本地客户端安装lrzsz:

1
brew install lrzsz

本地客户端安装zssh:

1
brew install zssh

1)下载

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# tidy @ TidydeMBP in ~ [15:56:24]
$ zssh finder@10.121.22.201
Press ^@ (C-Space) to enter file transfer mode, then ? for help

finder@10.121.22.201's password:
Last login: Mon Jul 30 15:56:20 2018 from 10.121.80.1
-bash: ulimit: open files: cannot modify limit: 不允许的操作
[finder@im2-gf-test ~]$ ssh imhtp@localhost
imhtp@localhost's password:
Last login: Mon Jul 30 15:56:49 2018 from 10.121.80.1
[imhtp@im2-gf-test ~]$ cd /opt/20180728/
[imhtp@im2-gf-test 20180728]$ sz tmp.txt
�*B00000000000000

# ctrl+@
zssh > pw
pw: No such file or directory
zssh > pwd
/Users/tidy
zssh > cd Downloads
zssh > rz
Receiving: tmp.txt
Bytes received: 0/ 0 BPS:0
Retry 0: Got TIMEOUT

Transfer complete

2)上传

1
2
3
4
5
6
7
8
9
10
11
[imhtp@im2-gf-test 20180728]$

#ctrl+@

zssh > pwd
/Users/tidy/Downloads
zssh > sz 新模板微信.txt
Sending: 新模板微信.txt
Bytes Sent: 2505 BPS:1191

Transfer complete

3)SCP

简单使用SCP,复制远程服务器文件夹到本地

1
scp -r finder@10.121.22.201:/opt/20180728 ~/Downloads