What Is Telnet And How To Enable It In Windows 11, 10

Telnet Windows 11 10Telnet Windows 11 10

The Terminal Over A Network (telnet) connection allows you to connect to a remote computer using the command line. You can then run scripts and programs on the remote PC. The system administrators may already be familiar with this feature.

If you are new to this, then this article is for you. Before you can remotely access another computer, the telnet feature needs to be enabled on all Windows versions. In this article, we discuss in detail what telnet is, and how to enable it.

Note: The methods discussed in this post explain how to enable Telnet Client, which is enabled on the source computer. Telnet Server will need to be enabled on the remote (target) computer to which you want to connect.

What is Telnet

Telnet is a network protocol that is used to log into a remote computer on the same network using the command line interface.

To establish remote sessions, telnet adheres to a user command Transmission Control Protocol/Internet Protocol (TCP/IP) networking protocol. Using this, users can sign in with regular user accounts with the permissions they have been allowed to the particular programs and data on the target computer.

Telnet uses a client-server relationship to establish a connection. It is a text-based communication mechanism between a client machine and a server where an individual can run commands on a remote computer while being logged in as a local user.

Telnet can be used to perform any number of functions, like editing files, running applications, etc., on remote computers.

Telnet Client vs. Telnet Server

As mentioned earlier, Telnet uses the client-server configuration method to establish a connection to a remote computer. Telnet Client is a piece of software that you enable on client computers from which you access the remote computer. Whereas, the Telnet Server is the target computer that you connect with over the network.

In other words, on the Telnet Server, the Telnet port needs to be opened and allowed to let other computers connect to it.

That said, one common issue that many users face on the Windows command line is experiencing the error “telnet is not recognized as an internal or external command.”

Fix “Telnet is Not Recognized”

If telnet is not enabled on a computer and you try to connect to a remote computer using this protocol, you will see the following error message:

'telnet' is not recognized as an internal or extenral command, operable program or batch file.
Telnet is not recognized
Telnet is not recognized

This means that telnet needs to be enabled before you can use it to establish remote connections over the network. Of course, if the feature is not enabled, how can the Windows computer recognize it?

If you are seeing such an error, then you can also benefit from all the methods shared below to enable Telnet on your Windows PC.

How to Enable Telnet on Windows

Enable Telnet from Optional Features

The files for the optional features on a Windows PC are always there, but the feature is not installed. Since telnet is an optional feature, here is how you can enable it:

  1. Open the Optional Features applet by typing in “optionalfeatures” in the Run Command box.

    optionalfeatures
    Open Optional Features
  2. Check the box with “Telnet Client” and click Ok.

    Enable telnet from Optional Features
    Enable telnet from Optional Features

    The feature will now begin to install.

  3. Once installed, close the wizard.

    Close wizard
    Close wizard

Telnet will now be enabled and you may continue to use the command line to connect to a remote computer.

To disable Telnet, simply uncheck the box next to “Telnet Client” in the Optional Features applet.

Enable Telnet from Command Prompt

You can also enable the telnet client directly from the Command Prompt. This method can come in handy if you are already inside the Command Prompt and trying to connect remotely using telnet.

  1. Ensure you are running Command Prompt with elevated privileges.

  2. Run this cmdlet:

    pkgmgr /iu:"TelnetClient"
    Enable telnet from Command Prompt
    Enable telnet from Command Prompt

    The command will run silently and install telnet in the background. Alternatively, you can also use this command to enable Telnet:

    Note: Elevated privileges are required to run the DISM command.

    dism /online /Enable-Feature /FeatureName:TelnetClient
  3. If prompted with a UAC, click Yes.

    You can now begin connecting to a remote computer once the telnet is installed

To disable telnet from the Command Prompt, run the following cmdlet using Deployment Image Servicing and Management (DISM):

dism /online /Disable-Feature /FeatureName:TelnetClient
Disable telnet from Command Prompt
Disable telnet from Command Prompt

Enable Telnet from Windows PowerShell

If you are using PowerShell, run the following command in an elevated PowerShell instance to enable the Telnet Client:

Enable-WindowsOptionalFeature -Online -FeatureName TelnetClient
Enable telnet using PowerShell
Enable telnet using PowerShell

Telnet will now be enabled. You may now continue to access a remote PC using telnet directly from PowerShell.

In case you wish to disable the feature in the future, run this cmdlet in Windows PowerShell:

Disable-WindowsOptionalFeature -Online -FeatureName TelnetClient
Disable telnet using PowerShell
Disable telnet using PowerShell

Enable Telnet Remotely

The methods above show how you can enable the Telnet Client on the local computer. However, you can also enable it on a remote PC on your network. This is especially useful if Telnet has not been allowed through the target computer’s firewall.

To enable telnet on a remote Pc, we must use PsTools by SysInternals – which is a suite of command-line tools for the Windows operating system. Using the PsExec utility inside this suite, you can remote access the Command Prompt of the target PC and then run any command.

Use the following steps to enable Telnet on a remote PC:

  1. Start by downloading and extracting PsTools.

    Extract PsTools
    Extract PsTools
  2. Launch an elevated Command Prompt and use the CD cmdlet to change the directory to the extracted folder:

    CD [PathToExtractedPsTools]
    Change directory to PsTools
    Change directory to PsTools
  3. Now use the following command syntax to connect to the remote computer:

    Note: If you see an “Access is denied” error at this point, a solution for it is provided at the end of these steps.

    PsExec -i \\[RemoteComputerName] -u [Username] -p [Password] cmd

    Replace [RemoteComputerName] with the name of the PC you want to connect to, [Username] with the account name, and [Password] with the account password. Make sure that the account you are logging in with has administrative rights.

    Connect to remote computer using PsTools PsExec 1
    Connect to remote computer using PsTools PsExec

    You will now be connected to the remote PC.

  4. Now, use the following command to enable telnet on the remote PC:

    dism /online /Enable-Feature /FeatureName:TelnetClient
    Enable Telnet remotely
    Enable Telnet remotely

That’s it! Telnet has been successfully enabled on the remote computer, and you can now close the Command Prompt window.

If you faced the “Access is denied” error while attempting to access the remote computer with PsExec, it is probably because UAC is running on the remote machine. You must perform the following steps on the remote computer physically to disable UAC:

Note: This process involves making changes to the Windows Registry manually. Misconfiguration of critical values in the system’s registry could be fatal for your operating system. Therefore, we insist that you create a system restore point or a complete system image backup before proceeding forward with the process.

You can also use our top selection of disk imaging and backup software so you never lose your data or operating system again.

  1. Open the Registry Editor by typing in “regedit” in the Run Command box.

    Open the Registry Editor
    Open the Registry Editor
  2. Paste the following in the address bar for quick navigation:

    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
    Navigate to the System key
    Navigate to the System key
  3. Right-click the “System” key, expand New, and then click “DWORD (32-bit) Value.” Name this DWORD “LocalAccountTokenFilterPolicy“.

    Create the DWORD LocalAccountTokenFilterPolicy
    Create the DWORD LocalAccountTokenFilterPolicy
  4. Double-click the DWORD “LocalAccountTokenFilterPolicy” and change its Value Data to 1.

    Change Value Data to 1
    Change Value Data to 1
  5. Now restart the computer for the changes to take effect.

Once these steps are performed, you should be able to access the remote computer using PsExec.

How to Check if Telnet is Disabled

Once Telnet is enabled, you can verify it by typing in “Telnet” in the Command Prompt. This will change and open another command line with “Microsoft Telnet” written, as in the image below.

Check if telnet is enabled
Check if telnet is enabled

Closing Words

In comparison, the Remote Desktop Connection can also be used to access a PC on the same network remotely. It offers a GUI interface, and you can log into a local account, and run apps and cmdlets, just like telnet.

However, if you prefer using the Command Line Interface instead, then telnet is the right tool for you. It is quick to connect and gives you more control over the remote PC.

If you liked this post, Share it on:
Subhan Zafar is an established IT professional with interests in Windows and Server infrastructure testing and research, and is currently working with Itechtics as a research consultant. He has studied Electrical Engineering and is also certified by Huawei (HCNA & HCNP Routing and Switching).

Leave the first comment

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information

Talk to us now

Talk to us straight and get your questions answered right away

Tell Us About Your Project