What is Telnet. Telnet port - what is it? Connecting and starting Telnet

💖 Do you like it? Share the link with your friends

Application layer protocol TELNET (from English. T.E. rmina LNET work) is a network protocol for implementing a text interface over the network. Name telnet We also received client programs for implementing this protocol for almost all existing operating systems. The Telnet protocol is one of the oldest network protocols, developed as a means of communication between remote terminals in test mode. Therefore, it does not provide data encryption or modern authentication tools. The protocol is vulnerable to many network attacks and cannot be used as a means of managing network operating systems. Currently, the SSH (Secure SHell) network protocol is used for remote access to the system, the creation of which focused specifically on security issues. The relative security of Telnet sessions is carried out only in a fully controlled network environment or using protection at the network level (various implementations of VPN - virtual private networks). However, TELNET is still used to manage specialized network devices (Switches, routers, etc.), as well as for network diagnostics, debugging and studying other text-oriented (telnet-like) protocols based on the TCP transport. The current Telnet protocol standard is described in RFC 854.

In modern operating systems of the Windows family, the utility telnet.exe by default, not installed. To install it you need to go to Control Panel - Programs and Features - Turn Windows features on or off and check the box for Telnet client. Or, in a command prompt running as an administrator, run the command:

pkgmgr /iu:"TelnetClient"

Command line format:

telnet [-a][-e Symbol][-f File][-l Name][-t Type][Host [Port]]

Command line options:

-l The user name to log into the remote system, assuming the TELNET ENVIRON option is supported.

-a Automatic login attempt. Like the -l switch, but uses the current username under which you are logged in.

-e Service character for switching input mode in the telnet client window.

-f Client-side log file name. In the Russian help, this parameter is incorrectly interpreted as Login_File - “File name on the client side for logging into the system.”

-t Telnet terminal type. 4 types of terminals are supported: vt100, vt52, ansi and vtnt.

Knot The host name or IP address of the remote computer to which you are connecting. Port Port number or service name. If the number is not specified, then the standard Telnet port 23\TCP is used

When launched without parameters, the utility goes into command input mode:

Welcome to the Microsoft Telnet Client

Microsoft Telnet>

When entering a character ? or help Help information is displayed:

Teams may be shortened. Supported commands are:

c-close- close the current connection

d-display- display operation parameters

o - open hostname [Port]- connect to the site (by default, Port = 23)

q - quit- exit telnet

set-set- set parameters ("set?" to display a list of them)

sen - send- send strings to the server

st - status- display information about the current state

u - unset- reset parameters ("unset ?" to display a list of them)

? /h - help- issue a certificate

Some of the commands allow you to get hints for use when entered with a question character:

Telnet> set ?- get a hint on using the mode setting command. Example of information displayed:

bsasdel- symbol BackSpace Delete

crlf- carriage return mode; causes CR & LF characters to be sent

delasbs- symbol Delete will be sent as a character BackSpace

escape x- where x is the symbol for switching to telnet terminal mode and back

localecho- enable local echo.

logfile x- where x is the log file. In Russian translation it is incorrectly interpreted as “Current client login file”

logging- recording the current session in the log. In Russian translation it is incorrectly interpreted as "executing a login"

mode x- where x=console is the console mode used for working with windowed applications (vi editor) and x=stream is the streaming mode used for working on the command line.

ntlm- enable NTLM authentication.

term x- type of emulated terminal. Where x is ansi, vt100, vt52, or vtnt.

To get a hint on how to cancel the installed parameters, use the command

Microsoft Telnet> unset?

bsasdel- symbol BackSpace will be sent as a character Delete

crlf- line feed mode; causes the CR character to be sent

delasbs- symbol Delete will be sent as a character Backspace

escape- the symbol for switching to telnet terminal mode and back is not set

localecho- disable local echo

logging- disable log recording. In the Russian-language version it is incorrectly interpreted as "disabling login"

ntlm- disable NTLM authentication.

Examples of commands in interactive mode:

open 192.168.0.1- connect to the Telnet server with an IP address 192.168.0.1

o zte-f660- connect to a Telnet server named zte-f660. Command abbreviation used o pen

set logfile C:\telnet.log- use as log file C:\telnet.log

set logging- record the current session to a log file.

display- display the parameters of the current session. Example of information displayed:

Mode switch symbol: "CTRL+]"

NTLM Authentication - Enabled

Local echo output - disabled

New Line Mode - Character ENTER will be shipped as CR&LF

Current mode: Streaming

TERMINAL MODE

Preferred ANSI Terminal Type

    In practice, the utility telnet.exe used as a diagnostic and debugging tool to connect not only to the Telnet server on TCP port 23, but also to any other TCP port, thereby allowing interaction with any command line-controlled application. So, for example, using the utility telnet you can connect to servers that support text (telnet-like) input of commands and data - SMTP, POP3, IMAP, etc. In addition, the utility can be used as a means of roughly checking the connectivity to any TCP port (checking whether a specific TCP port is listening).

telnet 192.168.1.1 8080- connect to host 192.168.1.1 on port 8080. In cases where the port is closed, the utility will report that connection is impossible. Moreover, to check the availability of a certain port, it is not even necessary that it is listened to by a service that supports text input, such as a VNC server. To disconnect from the remote server, you must enter the mode switching symbol (by default - CTRL+]).

The telnet.exe utility can be used, for example, to exchange with a mail server using the protocol POP3(Post Office Protocol ver. 3). This protocol is used by email client programs (Outlook, Outlook Express, The Bat, etc.) to receive email stored in the user's mailbox. This is the simplest protocol based on text messaging. In order to study the interaction of the mail client with the mail server, you can implement a connection session using TELNET.

By default, the POP3 server listens for incoming connections via TCP on port 110 ("listens" on port tcp/110). Telnet command to connect to a server, for example pop.mail.ru

telnet pop.mail.ru 110

If the server is healthy, its invitation will appear in the telnet window

+OK mPOP POP3 v1.1

user [email protected]

After which, the server will prompt you to enter a password:

OK Password required for user [email protected]

You need to enter a password

pass VasinPass

The server will report the result of the password check:

You can request a list of letters with a directive list:

list

In response to this, the server will display a list and sizes of letters in the mailbox:

OK 10 messages (152527 octets)
1 48628       1 is the serial number, 48628 is the size
2 1829
3 2070
:

If necessary, you can view the headers of the letters. To do this, use the command top sequence number, space, number of lines from the message body

top 2 0

In response to this, you will see the header of the letter containing service information about the sender, date of sending, return address and some other data:

Received: from (HELO mx1.ks.pochta.ru) by node7-1.ks.pochta.ru with QIP.RU LMTP
for [email protected];
Fri, 08 Apr 2011 15:18:33 +0400
Received: from mx3.softkey.ru ()
: :

The directive is used to receive letters retr sequence number

retr 2 - receive a letter with sequence number 2

To delete a letter, use the directive dele sequence number For example, to remove the 2nd letter from the list received by the directive list:

If the deletion was successful, the server will display the following message:

OK message 2 deleted

Sometimes, the TELNET command can also be used to identify the service listening on the specified port, since many of them display either their banner or specific service information when connected. For example, the FTP server greeting: 220-FileZilla Server version 0.9.43 beta

220-written by Tim Kosse ( [email protected])

220 Please visit http://sourceforge.net/projects/filezilla/

And this is what the screen looks like when connecting to the RealVNC server:

RFB 003.008

Teams telnet allow you to communicate with a remote computer using the Telnet protocol. You can run the command telnet without parameters to enter the telnet context indicated on the Telnet command line ( telnet). From the Telnet command line, use the following commands to control the computer running the Telnet client.

Teams tlntadmn allow you to remotely control a computer running a Telnet server. These commands are executed from the command line. Team tlntadmn without parameters displays the local server setting.

To use commands telnet from the Telnet command line

To launch the Telnet client and enter the Telnet command line

Syntax

telnet [\\ remote server]

Options \\ remote server Displays the name of the connected server /?

  • When using the command telnet The Telnet client starts without parameters.
  • At the Telnet command line, you must use Telnet commands.

To stop the Telnet client

Syntax

Options

none

Notes

  • This command can be shortened to q.

To connect a Telnet client to a remote computer

Syntax

open [\\ remote server] [port]

Options \\ remote server port Indicates the port to use. If no port is specified, the default port is used. Notes

  • This command can be shortened to o.
Examples

To connect to the remote Redmond server on port 44, enter at the command prompt: redmond 44

To disconnect the Telnet client from a remote computer

Syntax

close [\\ remote server]

Options \\ remote server Specifies the name of the managed server. If no server is specified, the local server is used. Notes

  • This command can be shortened to c.
Examples

To disconnect from the remote Redmond server, enter the command: redmond 44

To configure Telnet client settings

Syntax

set [\\ remote server] [ntlm] [localecho] [term {ansi | vt100 | vt52 | vtnt}] [escape symbol] [logfile file name] [logging] [bsasdel] [crlf] [delasbs] [mode {console | stream}] [? ]

Options \\ remote server Specifies the name of the managed server. If no server is specified, the local server is used. ntlm Enables NTML authentication if it is available on the remote server. localecho Enables local command display mode. term {ansi | vt100 | vt52 | vtnt) Specifies a terminal of the specified type. escape symbol Specifies the control character. The control character can be a single character or a combination of the CTRL key and a character. To set a key combination, hold down the CTRL key while typing the character you want to assign. logfilefile name Specifies the Telnet activity log file. The log file must be located on your local computer. Logging starts automatically after selecting this option. logging Enables logging. If a log file is not specified, an error message is displayed. bsasdel Specifies the BACKSPACE key to delete. crlf Assigns a new linear mode that defines the ENTER key as 0x0D, 0x0A. delasbs Assigns the DELETE key to delete the last character. mode {console | stream) Sets the operating mode. ? Allows you to view the full command syntax. Notes

  • To disable a previously assigned setting, at the Telnet command prompt, enter:

    unset [parameter]

  • To assign a control character, enter the command:

    -e symbol

  • In non-English versions of Telnet, the command is available codeset parameter. Codeset parameter specifies the current code set for the parameter, which can be one of the following: Shift JIS, Japanese EUC, JIS Kanji, JIS Kanji (78), DEC Kanji, NEC Kanji. You must assign the same code set on the remote computer.

To send Telnet client commands

Syntax

send [\\ remote server] [ao] [ayt] [esc] [ip] [synch] [? ]

Options \\ remote server The name of the server that you want to manage. If no server is specified, the local server is used. ao Cancels an input command. ayt Sends the command "Are you there?" esc Sends the current control character. ip Aborts execution of a processing command. synch Performs a Telnet synchronization operation. ? Allows you to view the full command syntax.

To view the current Telnet client settings

Syntax display

Options

None

Notes

  • This command displays the current operating parameters for the Telnet client. When operating in Telnet session mode (in other words, while connected to a Telnet server), you can exit the session to change settings by pressing CTRL+]. To return to the Telnet session, press ENTER.

To use commands tlntadmn from the command line

To administer a computer running Telnet server/P>Syntax

tlntadmn [\\ remote server] [start] [stop] [pause] [continue]Options \\ remote server Specifies the name of the server that you want to take control of. If no server is specified, the local server is used. start Starts the Telnet server. stop Stops the Telnet server. pause Terminates the Telnet server. continue Restarts the Telnet server. /?

  • Using commands tlntadmn tlntadmn

To administer Telnet sessions

Syntax

tlntadmn [\\ remote server] [-s] [-k{session_code | all}] [-m {session_code |all} " message" ]

Options \\ remote server -s Displays active Telnet sessions. -k{session_code | all) Ends sessions. Enter a session code to end a specific session or enter all to end all sessions. -m {session_code | all} " message" Sends a message to one or more sessions. Enter a session code to send a message to a specific session, or enter all to send a message to all sessions. Type the message you want to send in quotes (i.e. " message" ). /? Displays help on the command line. Notes

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.

To set event log settings for the computer running Telnet Server

Syntax

tlntadmn [\\ remote_computer] config [auditlocation={eventlog | file | both}][audit=[{+ | - } admin][{+ | - } user][{+ | - } fail]]

Options \\ remote server auditlocation={eventlog | file | both) Specifies whether event information should be sent to the Event Viewer, to a file, or to both. audit=[{+ | - } admin][{+ | - } user][{+ | - } fail] Specifies which events require auditing (administrator logon events, user logon events, or failed logon attempts). To audit a specific event type, enter a plus sign (+) in front of the event type. To stop auditing of a specific event type, enter a minus sign (-) in front of the event type. /?

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.
  • If you specify where to send event information without specifying the information type or types to be audited, only administrator log event information will be audited and sent to the specified location.
Examples

To send event information to the Event Viewer, enter:

tlntadmn config auditlocation=eventlog

To audit administrator logon events and failed logon attempts, enter:

tlntadmn config audit=+admin +fail

To set the primary domain for the computer running Telnet Server

Syntax

tlntadmn [\\ remote server] config [dom=domain name]Options \\ remote server Specifies the name of the server that you want to take control of. If no server is specified, the local server is used. dom=domain name Specifies the domain that you want to make primary. /? Displays help on the command line. Notes

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.
Examples

To make the Redmond domain the primary domain on your local server, enter:

tlntadmn config dom=Redmond

To map the ALT key to the computer running the Telnet server

Syntax

tlntadmn [\\ remote server] config [ctrlakeymap={yes | no}]

Options \\ remote server Specifies the name of the server that you want to take control of. If no server is specified, the local server is used. ctrlakeymap={yes | no) Indicates whether the Telnet server should interpret the CTRL+A key combination as ALT. Enter yes to map a keyboard shortcut or no to refuse matching. /? Displays help on the command line. Notes

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.
  • If the ALT key is not mapped, the Telnet server does not send the ALT keystroke to applications where it might be needed.

To set the maximum number of connections for the computer running Telnet Server

Syntax

tlntadmn [\\ remote server] config [maxconn=positive_integer]

Options \\ remote server Specifies the name of the server that you want to take control of. If no server is specified, the local server is used. maxconn=positive_integer Sets the maximum number of connections. This number can be specified using any positive integer less than 10 million. /? Displays help on the command line. Notes

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.

To set the maximum number of failed access attempts for the computer running the Telnet server

Syntax

tlntadmn [\\ remote_computer] config [maxfail=positive_integer]

Options \\ remote server Specifies the name of the server that you want to take control of. If no server is specified, the local server is used. maxfail= positive_integer Sets the maximum number of failed login attempts allowed for a user. This number can be specified using any positive integer less than 100. /? Displays help on the command line. Notes

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.

To set the operating mode for the computer running the Telnet server

Syntax

tlntadmn [\\ remote server] config [mode={console | stream}]

Options \\ remote server mode {console | stream) Indicates the operating mode. /? Displays help on the command line. Notes

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.

To set the Telnet port for the computer running the Telnet server

Syntax

tlntadmn [\\ remote server] config [port=integer_value]

Options \\ remote server Specifies the name of the server that you want to take control of. If no server is specified, the local server is used. port=integer_value Specifies the Telnet port. The port can be specified using any integer less than 1024. /? Displays help on the command line. Notes

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.

To set authentication methods for the computer running the Telnet server

Syntax

tlntadmn [\\ remote server] config [sec=[{+ | - } ntlm][{+ | - } passwd]]Options \\ remote server Specifies the name of the server that you want to take control of. If no server is specified, the local server is used. sec=[{+ | - } ntlm][{+ | - } passwd] Specifies whether NTML or password authentication is used, or both, to authenticate login attempts. To use a specific authentication type, enter a (+) sign in front of the authentication type. To prevent a specific type of authentication from being used, enter a (-) sign in front of that type. /? Displays help on the command line. Notes

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.
  • NTML is an authentication protocol for transactions between two computers, one or both of which are running Windows NT 4.0 and earlier. Additionally, the NTML authentication protocol is used for computers that are not part of a domain, such as independent servers and workgroups.

To set the idle session timeout for the computer running the Telnet server

Syntax

tlntadmn [\\ remote server] config [timeout=hh: mm: ss]

Options \\ remote server Specifies the name of the server that you want to take control of. If no server is specified, the local server is used. timeout=hh: mm: ss Sets the elapsed time value in hours, minutes, and seconds. /? Displays help on the command line. Notes

  • Using commands tlntadmn You can remotely administer a computer running Telnet Server if both computers are running Windows XP. Teams tlntadmn cannot be used to remotely administer a Telnet server running Windows 2000 from a computer running Windows XP.
Notes
  • To switch from the Telnet client to command mode, at the Telnet command prompt, press CTRL+]. To return to the Telnet client, press ENTER.

Progress is a phenomenon that knows no stops. In the field of information technology, changes occur every day: new products appear, obsolete services become a thing of the past. But there are tools that are still popular despite the emergence of an alternative. A prime example is the Telnet protocol. What is Telnet and how to use it?

A little history: when and why did Telnet appear?

Telnet appeared more than 40 years ago, shortly after the installation of the first ARPANET server. This is one of the oldest protocols on the Internet. In an era when there was no trace of it, but the first networks had already appeared, the need for remote connection to devices dictated its requirements. The first solution to the problem that appeared, like all subsequent ones, allowed you to work on a remote device as if it were your own. All supported functionality has become available in the interface. You just need to get the required access level and know the Telnet commands. We figured out what this protocol is and why we need it. But how is Telnet connection implemented today?

Launch the terminal. Enable required services

In modern operating systems of the Windows family, before starting Telnet, you need to check whether this component is installed on the system. This is not difficult to do. For Windows 7, the most common operating system today, you need to perform the following sequence of actions:

  1. Select "Control Panel" or Control Panel from the Start menu.
  2. In the window that opens, select “Programs”. In the English version of the system this will be Programs.
  3. Go to the “Turn Windows features on or off” tab. The system generates a list of all available components. Already installed ones will be marked with checkboxes. This process may take several minutes.
  4. After the list is loaded, you need to find the Telnet client item. There is also a Telnet server in the menu, but we will return to this a little later. If there is no checkmark next to the item we need, it needs to be checked.
  5. After clicking the "OK" button, the system will begin to install the necessary components for the correct operation of the protocol. This may take some time, but on modern computers the process is unlikely to take more than a minute. Thus, the question of how to enable Telnet was resolved in 5 simple steps.

Telnet service: and Telnet client?

Both concepts from the title have already been mentioned a little higher. Like many other applications, Telnet has a client side and a server side. However, a Telnet server is not necessarily a server in the general sense of the word. The computer from which the connection is made is considered to be a client, the device to which this connection is made will be the server. This could be a router, a computer, or any other host that supports command line control. If we are talking about remote administration of a personal user computer or server, the Telnet port must be open. It is often closed for security reasons, so when you try to establish a session, an error message will appear. To check open and closed ports, you can use a special utility or web service. The standard Telnet port is 23. If you want to not only connect to other computers yourself, but also allow administration of your PC via Telnet, then in the same operating system snap-in you need to check the box next to the Telnet server component. The PCs and server hardware that you administer should be configured in the same way.

Programs for working with Telnet

After starting all the necessary Telnet services, you can safely start working using the built-in Windows tool - the command line. It is called up from the Start menu, either by clicking on the corresponding item, or by speed dialing (cmd). It is advisable to always run the command line with “Administrator” user rights (either local, the device on which you are working, or domain). This way, you won't have to restart the application if elevation is required. In addition to the existing tool of the operating system itself, there are also third-party programs that allow access via the Telnet protocol. The most popular of them is Putty. Along with it, other applications running under different operating systems are also popular, such as TeraTerm, AnyConnect, DTelnet, EasyTerm, KoalaTerm and many others. Which program to use, everyone decides for themselves, depending on personal preferences, interface requirements, etc. There are no significant differences in terms of functionality between them, and there cannot be. Each utility implements the entire available list of Telnet commands.

Telnet commands: how to figure it out?

For an experienced user, it will not be difficult to install the necessary components in a matter of minutes (if they have not been installed previously), open a Telnet session and perform all the configuration of the remote host. However, there are also newcomers who see the console almost for the first time in their lives. How to find out the list of available commands in Telnet? What is WONT AUTH or SET LOCALECHO? Everything is not as difficult as it seems at first. First, you should always remember that any command interface has built-in help. It can be accessed using standard keys, for example, help or “?”. Secondly, given how old it is, there are endless resources on the web with useful syntax information. Thus, there is absolutely nothing to worry about. And practice shows that using several lines of commands the result is much easier to achieve in most cases. And after just a few sessions, you will confidently type the necessary commands without resorting to the syntax assistant.

Telnet on network devices

We have already said that using the Telnet protocol you can manage not only computers, but also a wide variety of network devices. The most common class of such devices is routers. So what is Telnet in a router, what is it for, how to enable it?

Depending on the manufacturer and specific model, you can enable Telnet access in different ways. You can log into the router via the web interface or through the console. In the first case, you will need to find a remote administration point where one or another type of connection is allowed (Telnet, ssh). In the second case, access can be granted via the command line. Each administrator chooses a scenario that is convenient for themselves. However, there are routers that implement only one of two possible initial connection options, for example, only a web interface is available. An administrator who is accustomed to working with the console will find it rather uncomfortable to look for the item where he needs to put the coveted checkbox, but in reality there is nothing complicated about it. The interface of most modern routers is quite clear. The names of the menu items speak for themselves; the minimalist design will not allow you to get confused.

Advantages of Telnet sessions

At this point, we've become familiar enough with the technology to talk about the pros and cons of Telnet. No matter how successful the product is, it cannot be said that it is absolutely devoid of disadvantages. And if we are talking about a service that was released at the very beginning of the 70s of the last century, you should not forget about this fact.

Of the obvious advantages, it is necessary to note the simplicity, speed and convenience of the protocol. In less than a minute, a convenient client will contact the server TCP port of your choice and create a local terminal emulation. Above we talked about the standard 23 working port. In fact, you can “listen” and “talk” via Telnet on any port. This is where the flexibility of the protocol lies.

Compared to other remote administration protocols, Telnet is less processor intensive. With the current pace of development, this plus may seem insignificant, but only at first glance. Along with the development of technology, companies producing software do not stand still. Applications are becoming more and more bulky, requiring more and more hard drive space, more RAM, and more powerful processors. A utility that, compared to other installed software, will consume a small amount of system resources will come in handy.

Disadvantages of the Telnet protocol

The main and often cited disadvantage of Telnet is that access to a remote device is carried out over an unencrypted communication channel. The only barrier for an attacker is user authentication at the time of opening a Telnet session, that is, the requirement for a login and password. However, this data is also transmitted unencrypted. Therefore, if someone sets out to hack Telnet access, he only needs to briefly run a packet sniffer (software for “catching” packets). After some time, the administrator will open his Telnet session and provide the remote server with a login and password, which will be immediately intercepted by the attacker in clear text. In this context, an alternative to Telnet is SSH (secure connection). Therefore, it is not recommended to use Telnet in widely accessible networks, for example, outside your secure office LAN. In addition, you should remember that the connection to the server may be interrupted.

Conclusion. To use or not?

Of course, other methods of remote administration have emerged over more than four decades. SSH is very popular. It would seem that Telnet should have disappeared a long time ago. But it is still in demand and is still used. If you follow certain security principles, remembering that your local network must be reliably protected from outside penetration, using Telnet will not cause harm to your equipment. If you neglect security, neither SSH nor any other technology will save you.

Telnet is still used in areas such as connecting to databases, checking the availability of network devices (routers and switches), server equipment, etc.

Using the telnet command makes it possible to establish a communication channel with computers at a distance.

And the utility itself is almost a kind of browser emulator in the terminal, supporting several network protocols.

Previously, telnet was often used to manage PCs running the Linux operating system.

And now, using the same utility, they test the network, check ports, manage routers and other IoT devices.

Content:

Features of the utility

Despite the fact that the main task of telnet is to create a connection between PCs remote from each other using the protocol of the same name, you can also manage other services using the utility.

For example, access POP3, HTTP, IRC or SMTP.

After all, these and some other services operate on the basis of the TCP transport protocol, to work with which you can use the telnet client.

The syntax of telnet commands when connecting to a remote computer is as follows: $ telnet (options) (host) (port).

The host is the domain of the computer to which the connection is made. Port – port on the computer from which access is being made. And the options could be as follows:

  • -4 and -6 enforce the use of ipv4 and ipv6 addresses, respectively;
  • -8 makes it possible to use 8-bit encoding;
  • -E disables support for escape sequences;
  • -a automatically registers the user on the remote system;
  • -d enables debugging mode;
  • -p enables rlogin emulation;
  • -e sets the initial escape character;
  • -l authorizes the user in the system.

After a connection to the remote host is established, the telnet utility begins working in one of two modes - line by line or character by character.

The first option is the most preferable due to the ability to edit the text directly and send it only after the user has completely typed in all the information.

The disadvantage of this line-by-line mode is the lack of support for it by some services. While character-by-character can be used in any case.

However, when using it, all information is sent instantly.

And if the user makes a mistake, it will be impossible to correct it - after all, even spaces and Backspace are sent to the server in the form of characters.

You should know: When using the telnet protocol, there is no possibility of encrypting information transfer. All data is sent directly and can be intercepted by an unauthorized user. And it is not recommended to transmit them in this way - it is advisable to use the secure Secure Shell network protocol for this.

Basic Commands

When working with the telnet protocol, the user enters the appropriate commands into the console. The most popular include the following:

  • OPEN (PC name) (port). Allows you to communicate with the computer whose name is specified in the command. If you do not specify a port, the utility will try to use the default number. Sometimes it is indicated instead of the PC name;
  • DISPLAY (argument). Command to display a full or partial set of telnet utility parameters;
  • CLOSE. Designed to close the telnet session and return the system to command mode;
  • QUIT. Command to end all open connections and exit telnet;

Rice. 2. Using the Quit command in the MS Telnet client.

  • MODE TYPE. Used to control one of two input mode options (character-by-character or line-by-line). In this case, a request is sent to the remote computer to switch to a certain mode, and, if it is supported by the service, the corresponding switching is provided;
  • STATUS. A command that displays the current utility status, name and exchange mode;
  • ? (team). Reports information about the corresponding command sequence. It is needed in cases where the user is going to use a command that is unfamiliar to him;
  • ! (team). Executes a command sequence on the local system;
  • SEND ARGUMENTS. Sends character arguments to the remote PC;
  • ESCAPE. Sends one of the escape characters such as comma, bracket, or caret (^);
  • SYNCH. Serves to send a synch sequence that allows you to cancel all commands typed but not yet sent. Used only in line-by-line mode;
  • BRK. Sending a break sequence when the Break key is pressed.

All of these commands are basic, although their total number is much larger. However, due to the rather rare use of this utility, the easiest way to find a complete list of them is by entering HELP in the terminal.

And, after displaying the complete list, get help information about each command sequence using the “?” command.

Although, for example, for a telnet client on Windows, the list may be shortened.



tell friends