Reprinted Meng Guang Meng Shu's blog: Https://learndevops.cn/index.php/2016/06/14/how-to-transfer-file-using-xshell
Xshell at present the best use is: SECRETCRT
Today introduced a xshell of the use of small tricks, it is convenient to transfer files between the desktop computer and the server. No matter how many layers you relay, you can transfer them.
First we install a software called Lrzsz on the server, the CentOS 6 system comes with this software and can be installed directly using the Yum command:
Yum Install Lrzsz
If we want to download a file test_file the current directory of the server to the desktop computer, only need to perform SZ Test_file,xshell on the server will automatically pop up a dialog box, select the directory where you want to save the file and click Confirm to complete the download.
If we want to upload a desktop file steppermotor.c to the server, simply click File–transfer–send ZMODEM in the Xshell menu and select the file you want to upload, and you can complete the transfer after confirming.
This file transfer uses a protocol called Zmodem, which is very old, but has an unparalleled advantage: there is no need to open any additional services and ports on the server that can penetrate multiple servers to transfer files (we use Xshell to log on to a server on a desktop computer, You can then log on to the B server via SSH on a server, which is a common way to transfer files directly from B server to the desktop computer.
How to transfer files via Xshell