Menu
Is free
registration
home  /  Installation and configuration/ Install telnet. Telnet Commands

Installing telnet. Telnet Commands

Telnet Is a network utility that allows you to connect to a remote port on any computer and establish an interactive communication channel, for example, to send commands or receive information. We can say that this is a universal browser in the terminal that can work with a variety of network protocols.

This utility was very often used to remotely control a Linux computer, but then the secure SSH protocol came to replace it. But telnet is still used, for example, for network testing, port testing, and for interacting with various IoT devices and routers. In this article we will look at what telnet is and how to use telnet to solve your problems.

What is Telnet?

As I said, this utility is designed to create an interactive connection between remote computers. It works over the TELNET protocol, but this protocol is supported by many services, so it can be used to manage them. The protocol is based on TCP, and allows you to send regular string commands to another device. It can be used not only for manual control but also for interaction between processes.

To work with this protocol, we will use the telnet utility, it is very easy to use. Let's take a look at the telnet syntax:

$ telnet options host port

Host is the domain of the remote computer to connect to, and port is the port on that computer. Now let's take a look at the main options:

  • -4 - force the use of ipv4 addresses;
  • -6 - force the use of ipv6 addresses;
  • -8 - use 8-bit encoding, for example, Unicode;
  • -E- disable support for Escape sequences;
  • -a- automatic login, takes the username from the USER environment variable;
  • -b- use a local socket;
  • -d- enable debug mode;
  • -R- rlogin emulation mode;
  • -e- set the character of the beginning of the Escape sequence;
  • -l- user for authorization on a remote machine.

That's all for the telnet command to establish a connection. But connecting to a remote host is only half the battle. Once the connection is established, telnet can operate in two modes:

  • Line by line Is the preferred mode, where the line of text is edited on the local computer and sent only when it is completely ready. Not always and not all services have such an opportunity;
  • Character by character- all characters you type are sent to the remote server. It will be difficult to fix anything here if you make a mistake, because Backspace will also be sent in the form of a symbol and a movement arrow too.

The use of telnet is to send special commands. Each service has its own commands, but the protocol has its own telnet commands that can be used in the telnet console.

  • CLOSE- close the connection to the server;
  • ENCRYPT- encrypt all transmitted data;
  • LOGOUT- exit and close the connection;
  • MODE- switch the mode, from lowercase to character or from character to lowercase;
  • STATUS- see the status of the connection;
  • SEND- send one of the telnet special characters;
  • SET- set the parameter value;
  • OPEN- establish a connection via telnet with a remote host;
  • DISPLAY- display used special characters;
  • SLC- change the used special characters.

We will not consider all the commands, since you are unlikely to need them, and if you do, you can easily find them in the official documentation.

How do I use telnet?

Next, we will look at how to use telnet to solve your problems. Usually, the utility is already installed on most systems, but if it is not, then you can install telnet from the official repositories, for example, in Ubuntu:

$ sudo apt install telnet


It is not necessary to use telnet for this, there is ping.

2. Port check

With the help of telnet, we can check the port availability on the node, and this can already be very useful. To check the telnet port run:

$ telnet localhost 123 $ telnet localhost 22

$ telnet localhost 123

$ telnet localhost 22


In the first case, we see that no one accepts the connection, in the second, a message is displayed about a successful connection and a greeting from the SSH server.

3. Debugging

To enable debug mode and display more detailed information at runtime, use the -d option while connecting:

$ sudo telnet -d localhost 22

$ sudo telnet - d localhost 22

4. telnet console

Using the telnet console is also an important consideration in how to use telnet. In the main mode, you can execute commands on a remote server, but if you want to address the command specifically to telnet, for example, to configure its operation, you must use a special character to open the console, usually the utility immediately tells you what kind of character it is, for example, it is used by default “^ [“:


To activate it, you need to press the key combination Ctrl + [, then you will see the telnet prompt.

To see all the available commands, you can type ?. For example, you can see the connection status:

telnet> status

telnet> status


There are other interesting possibilities here as well. These things can be done on any connection using the telnet utility.

5. View telnet website

One of the common ways to use telnet is to test the site from the console. Yes, you will not get a beautiful web page, but you can manually collect requests and see all the data transmitted by the server.

$ telnet opennet.ru 80

$ telnet opennet. ru 80


Then type the command to the web server.

Telnet is one of the protocols for transferring data over the network. It is disabled by default in Windows 7 for added security. Let's figure out how to activate, if necessary, the client of this protocol in the specified operating system.

Telnet transmits data over a text interface. This protocol is symmetric, that is, there are terminals at both ends. This is related to the features of client activation, the various options for the implementation of which we will talk about below.

Method 1: Enabling Telnet Component

The standard way to start the Telnet client is to activate the appropriate Windows component.

  1. Click "Start" and go to "Control Panel".
  2. Then go to the section "Removing a program" in the block "Programs".
  3. In the left pane of the window that appears, click "Enabling or disabling components ...".
  4. The corresponding window will open. You will need to wait a little while the list of components is loaded into it.
  5. After the components are loaded, find among them the elements "Telnet server" and Telnet Client... As we have already said, the protocol under study is symmetric, and therefore, for correct operation, it is necessary to activate not only the client itself, but also the server. Therefore, check the boxes next to both of the above items. Next click "OK".
  6. The procedure for changing the corresponding functions will be carried out.
  7. After these steps, the Telnet service will be installed, and the telnet.exe file will appear at the following address:

    C: \ Windows \ System32

    You can start it, as usual, by double-clicking on it with the left mouse button.

  8. After these steps, the Telnet client console will open.

Method 2: "Command line"

You can also start the Telnet client using the capabilities "Command line".


But if the component itself is not activated, then the specified procedure can be done without opening the window for enabling components, but directly from "Command line".


Unfortunately, this method may not work in all editions. Therefore, if you failed to activate the component via Command line then use the standard method described in Method 1.

Method 3: "Service Manager"

If you have already activated both Telnet components, then the required service can be started via Service Manager.

  1. Go to "Control Panel"... The algorithm for performing this task was described in Method 1... Clicking "System and safety".
  2. Opening the section "Administration".
  3. Among the displayed items, we are looking for "Services" and click on the specified element.

    There is also a faster launch option Service Manager... Dial Win + R and in the field that opens, type in:

    Click "OK".

  4. Service Manager launched. We need to find an element called "Telnet"... To make this easier, let's build the contents of the list in alphabetical order. To do this, click on the column name "Name"... When you find the object you want, click on it.
  5. In the active window in the dropdown instead of the option "Disabled" select any other item. You can select a position "Automatically", but for security reasons, we advise you to stay on the option "Manually"... Next click Apply and "OK".
  6. After that, returning to the main window Service Manager, highlight the title "Telnet" and on the left side of the interface, click "Run".
  7. The procedure for starting the selected service will be performed.
  8. Now in the column "State" opposite the name "Telnet" the status will be set "Works"... After that you can close the window. Service Manager.

Method 4: "Registry Editor"

In some cases, when you open the include components window, you may not find elements in it. Then, in order to be able to start the Telnet client, it is necessary to make certain changes in the system registry. It should be remembered that any actions in this area of ​​the OS are potentially dangerous, and therefore we strongly recommend that you create a system backup or a restore point before carrying out them.

  1. Dial Win + R, in the opened area, type in:

    Click on "OK".

  2. Will open "Registry Editor"... In its left area, click on the section name "HKEY_LOCAL_MACHINE".
  3. Now go to the folder "SYSTEM".
  4. Next, go to the directory "CurrentControlSet".
  5. Then you should open the directory "Control".
  6. Finally, highlight the name of the directory Windows... In this case, various parameters contained in the specified directory will be displayed on the right side of the window. Find the DWORD parameter named "CSDVersion"... Click on its name.
  7. An editing window will open. Instead of meaning "200" need to install "100" or «0» ... After you have done this, press "OK".
  8. As you can see, the parameter value in the main window has changed. Close "Registry Editor" in the standard way, by clicking on the button to close the window.
  9. Now you need to restart your PC for the changes to take effect. Close all windows and running programs after saving active documents.
  10. After the computer is restarted, any changes made to "Registry Editor" will take effect. This means that now you can start the Telnet client in the standard way by activating the corresponding component.

As you can see, running the Telnet client in Windows 7 is not particularly difficult. It can be activated both through the inclusion of the corresponding component, and through the interface "Command line"... However, the latter method does not always work. It rarely happens that it is impossible to complete the task even through the activation of the components, due to the lack of the necessary elements. But this problem can also be corrected by editing the registry.

Customer Telnet being a tool for remote systems management, it is at the same time a simple and reliable tool for diagnosing network problems and allows you to quickly check the availability of a particular service (more precisely, the port that listens to the service) on a remote server via TCP (you will not be able to diagnose UDP services using telnet). Moreover, for most administrators, the telnet command is so familiar and natural that it is typed without hesitation, immediately after checking the availability of the remote system using ping (ICMP protocol).

On Windows 8 client telnet by default disabled... This is done for security reasons (Microsoft developers follow this principle without installing the telnet client by default, since Windows Vista / 2008). This does not mean that there is no telnet client in Windows 8, it just needs to be activated.

You can activate the Telnet client in Windows 8 using the graphical interface, or the command line. Below we will discuss both options.

Note: To perform the above operations, you must have local administrator rights (be a member of the administrators group).

Installing Telnet Client Using Windows 8 Control Panel

The easiest way to install the telnet client in Windows 8 for an ordinary user is graphical using the Windows Control Panel. To do this, open the control panel and go to the following path: Control Panel -> Uninstall or Change a Program > Turn Windows Features On or Off.

The window that appears will display a list of all available Windows 8 components. Find the item Telnet Client and mark it with a tick, then click OK and the installation of this component will start.

Note... The Windows 8 Telnet Server component is not recommended to be installed unnecessarily for security reasons.

After the installation is complete, you can open a command line and try to start the telnet client

Installing Telnet in Windows 8 from the command line

There is an even simpler and more elegant way to install a telnet client in Windows 8, for this we need the capabilities of the Windows command line.

The same operation can be performed using the Window Image Servicing Utility - Dism:

Dism / online / Enable-Feature / FeatureName: TelnetClient

You can remove the telnet client in Windows 8, respectively, using the commands

Dism / online / Disable-Feature / FeatureName: TelnetClient

Start / w pkgmgr / uu: "TelnetClient"

In the event that you need to activate telnet on multiple computers in a domain at once, you can use a startup script in group policies that executes one of the above commands.

In this article I will tell you how to use telnet in the operating system (OS) Windows 7. But first, I will briefly dwell on what telnet is and what it is used for. Telnet is one of the networking protocols. It appeared in the last century and was often used to remotely connect to various devices on the network.

And so, let's go directly to our question. In the standard installation in the Windows 7 operating system, this protocol is disabled. If there is a need to use this protocol on workstations with Windows 7 OS, you need to perform some manipulations to enable it. The need to use it may arise not only for system administrators who use it to configure network devices and often use it in their work, but also for ordinary users who are far from system administration.

There are at least two ways to enable the telnet protocol in Windows 7.

The first and most straightforward way is as follows:

In the window we put a tick - "Telnet client".

That's all, you have successfully enabled the Telnet protocol on your computer.

One more nuance is possible when the protocol is turned on by this method, there may be the following situation when, when selecting - "Enable or disable Windows components", the list of components may be empty. We will need to make a small adjustment to the registry. I remind you how to open the registry, press "Start" - just above Start, in the search line, type regedit,

After that, you need to send the workstation to reboot and repeat the above steps.

The second method uses the command line, ordinary users rarely work with it and often do not know that such functionality is available. Therefore, who does not consider himself an advanced user, it is better to use the first way to enable the protocol.

So, press "Start" - just above Start in the search line, type cmd and press Enter.

A black window opens, in which the cursor blinks, this is what we need - the command line. Next, in this line, type the command "dism / online / Enable-Feature / FeatureName: TelnetClient" and press Enter.

After a short pause, an information window appears that the operation was completed successfully. The entire Telneta installation is complete.

Hope my article is helpful. Remember that Telnet is far from a secure protocol, therefore, when working with it, you need to remember about security measures.