Full use of the Telnet command

Source: Internet
Author: User
Tags ftp ftp commands ftp connection hash mkdir remote ftp server file transfer protocol telnet program

As we all know, the Telnet protocol is a member of the TCP/IP protocol family and is the standard protocol and main way of Internet remote Landing service. It provides users with the ability to complete remote host work on the local computer. Use the Telnet program on the end user's computer to connect to the server. End users can enter commands in the Telnet program, which run on the server as if they were entered directly on the server's console. You can control the server locally. To start a Telnet session, you must enter a username and password to log on to the server. Telnet is a common way to remotely control a Web server.

Telnet Command Use method

The Telnet command allows you to communicate with a remote computer that uses the Telnet protocol. When you run Telnet, you do not use parameters to enter the Telnet context that is indicated by the Telnet prompt (Microsoft telnet>). You can use the Telnet command to manage the computer running the Telnet client from the Telnet prompt.

The Telnet client command prompt accepts the following command:

Open: Use Openhostname to establish a Telnet connection to the host.

Close: You can turn off an existing Telnet connection by using the command closed command.

Display: Use the display command to view the current settings of the Telnet client.

Send: Use the Send command to send commands to the Telnet server. The following commands are supported:

AO: Discard output command.

Ayt: "Are You There" command.

ESC: Sends the current escape character.

IP: Break process command.

Synch: Perform a Telnet synchronization operation.

BRK: Send a signal.

Commands other than those listed in the table will be sent as strings to the Telnet server. For example, SENDABCD will send the string ABCD to the Telnet server so that the string will appear in the Telnet session window.


Use the QUIT command to exit the Telnet client.


Configure the Telnet client for the current session using the SET command with one of the following parameters.


Backspace will be sent as a deletion.

CodeSet option

Available only when the language is set to Japanese. Setting the current code set to an option can be one of the following options:

? Shift JIS

? Japanese EUC

? JIS Kanji

? JIS Kanji (78)

? DEC Kanji

? NEC Kanji

You should set the same code set on the remote computer. By default, the Telnet client uses raster fonts. Before you can use these code sets to access a remote computer, you must configure the Telnet client to use TrueType fonts to ensure that the characters are displayed correctly.


New Line mode: Causes return key to send 0x0D, 0x0A.


Delete will be sent as a backspace key.


Converts from Telnet session mode to telnet command mode. When you are in Telnet command mode, pressing Enter returns you to the Telnet session mode.


Open Localecho.


Specifies the name of the file to which the Telnet log is written for the session. If you do not specify a path to the file, the file is created in the current directory. Specifying log files also initiates logging.


Start the log for the session.

Mode {Console | stream}

The mode of operation.


Start NTLM authentication.

term {ANSI | vt100 | vt52 | vtnt}

The type of terminal you want Telnet Client to simulate.


Displays help information for the set.


Use the unset command to turn off options previously set with the SET command.


Use the status command to determine whether the computer running the Telnet client has successfully connected.


Displays help information.

FTP: File Transfer Protocol. Let's talk about his function, mainly from the computer running the FTP server to transfer files. can be used interactively. Note here that only the machine with the TCP/IP protocol installed can use the FTP command.

Command format: FTP [-v][-d][-i][-n][-g][-s:filename][-a][-w:windowsize][computer]

Let's talk about what they mean.

-V does not show remote server response

-N Disables automatic landing when first connected

-I turn off interaction hints during multiple file transfers

-D allows debugging, displaying all FTP commands passed between the client and the server

-G does not allow the use of filename wildcards, which means that wildcard characters are allowed in local files and path names.

-S:FILENAME Specifies the text file that contains the FTP command. These commands are automatically run when the FTP command is started. There should be no spaces in the added argument.

-A When binding data connection, use any local port

-w:windowsize ignores the default 4096 transport buffers

computer specifies the IP address of the remote computer to which you want to connect

Oh, understand the above, say some specific orders, I personally feel that although the tool is now very convenient to use, but understand these commands in many places still very useful, like now NT under the command prompt


Description: Displays the description of the FTP command. You can add a parameter, add the command name you want to interpret, and display a list of all commands without adding it.

2) Append

Note: Attach the local file to the remote computer using the current file type settings. The approximate format is

Append Local-file [Remote-file] where Local-file is said to specify the local file to add.

REMOTE-FILE specifies that you want to attach the local-file to the remote computer file, and if you save this, use the local file name to make the remote file name.


Description: By default, the file transfer type is set to ASCII

4) Bell

Description: Ring-ling switch, meaning that the file transfer is completed whether there is a ling sound reminder. The default is off.

5) Binary

Description: Sets the file transfer type to binary.

6) Bye

Description: End the FTP session with the remote computer, that is, secure disconnect, exit FTP.

7) CD

Description: Change the working directory on the remote computer. such as CD data where data is the directory of the remote computer to which you want to enter.

8) Close

Description: Ends the FTP session with the remote server and returns the command interpreter.

9) dir

Description: Displays a remote file and a list of subdirectories. such as dir data local-file

Where data is the directory that specifies the list to view, the current directory is not specified. Local-file is the local file that specifies the list to be saved, and the output is on the screen if you do not specify it.

) Debug

Description: Debug switch, when open, print each command sent to the remote computer, the command before the-->

The default is off.

One) Disconnnect

Note: Disconnect from the remote computer, but also keep the FTP command prompt.

) get

Note: Use the current file transfer type to copy remote files to the local computer.

such as Get Remote-file local-file

REMOTE-FILE specifies the file to copy, Local-file is the name of the file on the local computer.

A remote-file has the same name if it is not specified.


Description: FileName Pass switch

) Hash

Description: A fast hash mark for each transfer data is printed (#). The data fast size is 2048 bytes. is turned off by default,

) help

Description: Displays an explanation of the FTP command, such as Help Commmand command is the one you want to explain, and a list of all commands is displayed if you do not command this argument


Description: This command almost forgot the function is to run the specified command on the local computer. Such as! command, which commands is what you want to run, if you do not add command This parameter, then display a local command prompt, then you enter the Exit command can return to FTP.


Note: Change the local directory of the native computer and, by default, start the FTP directory. Don't think it's useless, when you use FTP in order to pass files does not often change the local and remote computer directory?

In the case of LCD [directory] where [directory] is the directory that specifies the local computer to enter, if you do not add this parameter, the local computer's working directory is displayed.

) literal

Note: Send negotiation parameters to the remote FTP server, report.

such as lireral argument [...] where argument is the specified negotiation parameter to send to the remote server.

() LS

Description: Displays the files and Word directories for the remote directory.

such as LS remote-directory local-file

Where remote-directory refers to the list of directories to view, and the current working directory is not specified. Local-file is a local file that specifies that you want to save the list. The unspecified words are output on the screen.

) Mdelete

Description: Deletes files on the remote computer. such as Mdelete remote-file ...

Remote-file must be deleted from the file Ah, you can delete multiple.

) Mdir

Description: Displays a list of files and subdirectories for a remote directory and allows you to specify multiple files.

such as Mdir remote-file ... local-file

Parameters I think we should understand what it means? I don't understand. Just look at the previous command.


Description: Copies multiple remote files to the local computer using the current file transfer type.

such as Mget remote-files ...

In fact, Remote-files can specify more than one, he is to specify the remote files to be copied to the local computer.


Description: Create a remote directory.

Like the mkdir directory and the MD directory at the command prompt at NT, no more.


Description: Displays a summary of files and directories for a remote directory

such as MLS Remote-file ... local-file

Where remote-file This parameter must be added, '-' is the current working directory using the remote computer.

) mput

Description: Copy the local file to the remote computer using the current file transfer type.

such as Mput local-files ...

) Open

Description: Connect to the specified FTP server,

such as open computer port where computer is generally the IP address of the remote computer, port is not to mention the specified ports.

) prompt

Note: conversion prompts, when multiple file transfer, FTP prompts can have a choice to retrieve or save the file, if prompted, then mget and mput command transfer all files, by default is open.

) put

Note: Copy local files to a remote computer using the current file transfer type.

Like put Local-file Remote-file

Where Local-file is the local file specified to be replicated,

Remote-file is the name of the file on the remote computer to which you want to replicate, not specified with the same name as the filename on the local computer.


Description: Displays the current directory on the remote sensor computer.

) quit

Description: Ends the FTP session with the remote computer and exits FTP.

) Quote

Note: Send a protocol to a remote FTP server, report. Look forward to FTP single code answer, this command function and literal the same.


Description: Copies a remote file to the local computer using the current file transfer type, and he acts the same as the get command.


Description: Displays help for remote commands. The use of this command is the same as the help,! reference.


Description: Change the file name on the remote computer.

This command is the same as the NT command prompt ren, such as rename filename newfilename

) rmdir

Description: Deletes a remote directory.

This command is the same as the NT command prompt RM, such as RmDir directory

) Send

Note: Copy the local file to the remote computer using the current file Transfer type. Send and put command have the same functionality.

such as Send Local-file remote-file

Panax) Status

Description: Displays the current status of the FTP connection and conversion

) Trace

Note: Convert message tracking, run FTP command, trace will show the reason for no message.

) type

Description: Sets or displays the file transfer type.

such as type [Type-name]

Where type-name means the type of file transfer, which is ASCII by default, and the current transmission type is displayed without this parameter.

) User

Description: Specifies the user who is connected to the remote computer.

such as user user-name [passwd] [account]

User-name, needless to say, is the user name used to log on to the computer,

PASSWD is the specified user-name password, FTP prompts you for a password if you do not specify it.

Account is specified to log on to the computer accounts, if not specified, FTP prompts the account number.


Description: Convert redundant mode. If opened here, will show all FTP response, file transfer at the end of the transmission will show the efficiency and statistics, the default is open!

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.