SecureCRT uploading and downloading files using SZ and RZ commands

Source: Internet
Author: User
Tags ftp connection

First install: Apt-get install Lrzsz

securecrt This SSH client software also has a terminal emulator and file transfer capabilities. More convenient than the FTP command, and the server does not have to open the FTP service. Rz,sz is a command-line tool that is a Linux/unix zmodem file transfer with Windows .

  The Windows side needs to support Zmodem TELNET/SSH client,securecrt can use securecrt to login to unix/Linux Host (either Telnet or SSH).

Upload a file simply enter the command "RZ" in the shell terminal emulator to select the file on the local disk from the popup dialog and upload it to the server using Zmodem. Download file Simply enter the command "SZ file name" in the shell terminal emulator to download the file to "path/securecrt-5.1.3/" using Zmodem download/"directory. The default path for uploading and downloading can be modified by using "File Transfer". Set default directory: Options-->session options-->file transfer.

Note: You can set the copy-and-paste of the mouse with the global option---terminal.

If you want to change the background color and file name color of the securecrt terminal, simply click "Options"-"Session Options" on the menu bar and select "ANSI Color" and "the" in the right window of the "terminal"-"emulation" category. Select an alternate keyboard emulation-Linux".

Summarize the following three ways of securecrt files.

1. SCP
SCP can copy files between 2 Linux hosts
SCP [ -1246BCPQRV] [-C cipher] [-f ssh_config] [-I identity_file] [-L-limit] [-O ssh_option] [-P port] [-S program] [[[Emai] L Protected]]host1:]file1 [...] [[Email Protected]]host2:]file2

Scp-p Port [Email protected]:/home/user/filename/home/user/filename

Take the upper port capital P as the parameter, port user is the SSH user ServerIP is the remote server IP or domain name,/home/user/filename the file name of the remote server/home/user/filename Local The file name of the service server. The purpose of this command is to copy the remote filename to the local corresponding directory.

For example, upload a file to the Management server [[email protected] ~]# SCP./load.sh [Email protected]

* Copy files :
* Command format:
SCP Local_file [Email Protected]_ip:remote_folder
Or
SCP Local_file [Email protected]_ip:remote_file
Or
SCP Local_file Remote_ip:remote_folder
Or
SCP Local_file remote_ip:remote_file 1th, 2 Specify the user name, command execution after the need to enter the password, the 1th only specifies the remote directory, the file name is unchanged, 2nd specified the file name;
3rd, 4 does not specify a user name, command execution after the need to enter a user name and password, the 3rd only specifies the remote directory, the file name is unchanged, 4th specified the file name;

* Copy directory:
* Command format:
Scp-r Local_folder [Email protected]_ip:remote_folder
Or
Scp-r Local_folder Remote_ip:remote_folder

The 1th one specifies the user name, the command executes after the need to enter the password;
The 2nd does not specify a user name, the command will need to enter the user name and password after execution;
* Routine:
Scp-r/home/space/music/[Email protected]:/home/root/others/
Scp-r/home/space/music/www.cumt.edu.cn:/home/root/others/

The above command copies the local music directory to the remote others directory, which is remotely available after replication. /others/music/Directory

======
Copy from remote to local
======
From remote copy to local, as long as the copy from the local to the remote command of the following 2 parameter Exchange order;

For example:
SCP [Email Protected]:/home/root/others/music/home/space/music/i.mp3
Scp-r www.cumt.edu.cn:/home/root/others//home/space/music/

The advantage of SCP is that it is easy to use and the disadvantage is that you cannot list remote directories and change directories.


2. ZMODEM file Send/recv
RZ: Upload a file simply enter the command "RZ" in the shell terminal emulator to select the file on the local disk from the popup dialog and upload it to the server using Zmodem, for example (upload a rsyncd.conf file to the server):
[Email protected] ~]# RZ
RZ waiting to receive.
Starting Zmodem transfer. Press CTRL + C to cancel.
Transmitting rsyncd.conf ...
100% 715 bytes 715 bytes/s 00:00:01 0 Error
SZ: Download file simply enter the command "SZ file name" in the shell terminal emulator and you can download the file to the path/Zmodem using theSecureCRT-5.1.3/download/"directory, for example (download the rsyncd.conf file in the current directory of the server to local):
[Email protected] ~]# sz rsyncd.conf
Rz
Starting Zmodem transfer. Press CTRL + C to cancel.
Transmitting rsyncd.conf ...
100% 715 bytes 715 bytes/s 00:00:01 0 Error

3. sftp
SecureCRTPress Alt+p to open a new session for FTP operation.
Input: The help command, which shows that FTP provides all the commands
PWD: Querying the directory where the Linux host resides (that is, the remote host directory)
LPWD: Querying a local directory (typically the directory where Windows uploads files: we can see "session Options" in the "Options" drop-down box, two: We know the local upload directory is: d:/My Documents)
ls: query which files are connected to the directory in which the current Linux host resides
LLS: Query what files are currently in the local upload directory
LCD: Change the path of the local upload directory
CD: Change the remote upload directory
Get: Download files from a remote directory to a local directory
Put: Uploading files from a local directory to a remote host (Linux)
Quit: Disconnect FTP connection

SecureCRT uploading and downloading files using SZ and RZ commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.