For people who use Linux frequently, how can they quickly interact with the local machine after logging in to the Linux host using SSH? That is, upload and download files to the server and local. Rz and SZ are command line tools for transferring ZModem files between Linux/Unix and Windows.

Two SSH related commands provide convenience:


[Plain Text]

Plain text view
Copy the code

?
1
2
Sz: Sends the selected file to the local machine
Rz: Running this command will bring up a file selection window, from the local selection of files to the server (receive)

How to install the Rz /sz command in Linux: 1. Automatically install LRZSZ

Ubuntu: In a terminal, type the following command:

sudo apt-get install lrzsz


centos:

yum install lrzsz -y



2. Manually install the LRZSZ

[Bash shell]

Plain text view
Copy the code

?
1
2
3
wget [url=http:
//www
.ohse.de
/uwe/releases/lrzsz-0
12.20.
tar
.gz]http:
//www
.ohse.de
/uwe/releases/lrzsz-0
12.20.
tar
.gz[
/url
]
tar
ZXVF LRZSZ - 0.12.20.
tar
.gz &&
cd
LRZSZ - 0.12.20
.
/configure
&&
make
&&
make
install





Create a connection:


[Bash shell]

Plain text view
Copy the code

?
1
2
3
cd
/usr/bin
sudo
ln
-s
/usr/local/lrzsz/bin/lrz
rz
sudo
ln
-s
/usr/local/lrzsz/bin/lsz
sz





Type rz or sz in shell to experience….





Tags:

SSH File Uploading

.

Sz command

.

Rz command

.

LRZSZ installation

For more free technical information: annalin1203