How to Use Telnet in Windows 10

Last updated on November 9th, 2026 at 02:11 pm

To use Telnet in Windows 10, first turn on the client: open Control Panel, select Programs, select Turn Windows features on or off, check Telnet Client, and select OK. Then open Command Prompt and type telnet followed by the host name and the port, for example telnet google.com 80.

Applies to: Windows 10. The same telnet command works in Windows 11.

What Telnet is and when to use it

Telnet is a text-only way to connect from your computer to a service on another computer. Windows 10 includes a Telnet client, but it is turned off until you add it, and the telnet command does not run until the client is installed.

Most people use it today for two jobs:

  • Checking whether a port is reachable. A port is a numbered door that a service listens on. Web servers commonly use port 80, mail servers use port 25, and a Telnet server uses port 23. If Telnet can connect to a host on a given port, something is listening there and nothing in between is blocking it.
  • Signing in to older equipment. Some routers, switches and lab devices still offer a Telnet sign-in on port 23.

Warning: Telnet does not encrypt anything. User names, passwords and everything else you type travel across the network as readable text. Use it for port checks and on networks you trust, and do not type a password into a Telnet session over the internet or public Wi-Fi.

Is Telnet safe to use?

It is fine for checking whether a port is open, because you are not sending anything private. It is not safe for signing in over a network you do not control, because nothing is encrypted. Use SSH for that.

Admin account, host and port

  • An administrator account. Adding Telnet Client requires membership in the local Administrators group. If a User Account Control box appears, confirm it to continue.
  • The host and port you want to reach. The host is a name such as mail.example.com or an IP address such as 192.168.1.1. If you leave out the port, Telnet uses TCP port 23.
  • Something listening at the other end. The Telnet client only connects out. It cannot reach a computer that has no service running on the port you name.

Turn on Telnet Client in Windows 10

  1. Open Control Panel. You can type Control Panel in the search box on the taskbar and select it from the results.
  2. Select Programs. The Programs page opens with a Programs and Features section at the top.
  3. Select Turn Windows features on or off. The Windows Features box opens with a list of optional parts of Windows.
  4. Scroll down the list and check the box next to Telnet Client.
  5. Select OK. Windows installs the feature and shows a message when it is done.
  6. Select Close. You do not need to restart the computer.
Illustration of the path to turn on Telnet Client in Windows 10 and run the telnet command
Illustration: the path from Control Panel to the Telnet Client check box, then the telnet command in Command Prompt.

Connect to a host with the telnet command

  1. Open Command Prompt. Press the Windows key + R, type cmd, and press Enter. You can also type Command Prompt in the taskbar search box and select the app.
  2. Type telnet, a space, the host, a space, and the port, then press Enter. For example, telnet google.com 80 tries to reach Google’s web server on port 80.
  3. Read the result. If the port is closed or blocked, you see a line such as Could not open connection to the host, on port 25: Connect failed. If that error does not appear, the connection was made. What happens next depends on the service: a mail server, for example, answers with a line that starts with 220 and its name.
  4. When you are finished, press Ctrl+] (hold Ctrl and press the right square bracket key). This is Telnet’s default escape character, and it takes you to the Telnet prompt.
  5. Type quit and press Enter to close Telnet and return to the normal Command Prompt.

To connect to a real Telnet server, such as a router on your own network, leave out the port: telnet 192.168.1.1. Telnet uses port 23 and the device shows its own sign-in prompt.

Use the Telnet prompt and its commands

If you type telnet with nothing after it and press Enter, Telnet starts without connecting. You see a welcome line, a reminder that the escape character is Ctrl+], and the Microsoft Telnet> prompt. From there you can type these commands:

Command Short form What it does
open hostname port o Connects to the host. The port is optional and defaults to 23.
close c Closes the current connection but leaves Telnet open.
status st Shows status information for the session.
set localecho Shows the characters you type. Some mail servers need this.
set logfile filename Saves the session to a file on your computer and starts logging.
u localecho Turns an option back off. It works the same way for logging.
help Lists the supported commands.
quit q Exits Telnet.

A typical session looks like this: type telnet, then set localecho, then open mail.example.com 25. When you are done, type quit.

Options you can add when you start Telnet

The full form of the command is telnet [/a] [/e escapechar] [/f filename] [/l username] [/t type] [host [port]]. The options go before the host name:

  • /f filename logs the session to a file, as in telnet /f telnetlog.txt telnet.microsoft.com 44.
  • /l username sets the user name to sign in with on the remote computer.
  • /a attempts an automatic sign-in with the name of the user who is currently signed in to Windows.
  • /e escapechar changes the escape character from the default.
  • /t type sets the terminal type. The supported types are vt100, vt52, ansi and vtnt.
  • /? shows help for the command.

Turn on Telnet Client with a command instead

If you prefer the keyboard, or you are setting up several computers, DISM can add the feature. DISM is the built-in Windows tool for adding and removing optional features, and these commands must be run with administrator privileges.

  1. Open Command Prompt as an administrator.
  2. Type dism /online /Enable-Feature /FeatureName:TelnetClient and press Enter.
  3. Wait for the command to finish. To check the result, type dism /online /Get-FeatureInfo /FeatureName:TelnetClient and press Enter. If the state shows as pending, restart the computer to finish.

PowerShell has a matching cmdlet. In a PowerShell window opened as an administrator, run Enable-WindowsOptionalFeature -Online -FeatureName TelnetClient.

Is Telnet installed by default in Windows 10?

No. The client is part of Windows 10, but it is turned off until you check Telnet Client in the Windows Features box or enable it with DISM.

Confirm it worked, or turn Telnet off again

To confirm the client is installed, open Command Prompt, type telnet, and press Enter. If the Telnet client opens, it is installed. Type help to see the supported commands, or q to exit.

If you only needed Telnet for one test, remove it afterward so there is one less tool on the computer:

  • Control Panel: go back to Turn Windows features on or off, clear the Telnet Client box, and select OK.
  • Command Prompt as an administrator: run dism /online /Disable-Feature /FeatureName:TelnetClient.

Does this work the same way in Windows 11?

Yes. The telnet command is the same in Windows 10 and Windows 11.

Every option is listed in Microsoft’s telnet command reference. Once your test is finished, clear the Telnet Client box again if you do not expect to need it.

Test a port without installing Telnet

PowerShell can be a better way to test a port because it works with what Windows already includes. Open PowerShell and run a command in this form:

Test-NetConnection -ComputerName bing.com -Port 80

Replace bing.com and 80 with your host and port. Look at the TcpTestSucceeded line in the output: True means the port accepted the connection. This is a good choice on a work computer where you are not allowed to add Windows features.

For remote command-line access, rather than a quick port check, use SSH, which encrypts the session. The command takes the form ssh username@servername, and it only works after you enable SSH in Windows 10.

telnet not recognized or can’t connect

‘telnet’ is not recognized as an internal or external command, operable program or batch file

The Telnet client is not installed yet. Go back to the Control Panel steps and make sure the Telnet Client box is checked.

Could not open connection to the host, on port …: Connect failed

Telnet is working, but nothing answered on that port. Check the following:

  • Confirm the host name or IP address and the port number are typed correctly, with a space between them and no colon.
  • Make sure the service you are testing is running on the other computer.
  • Consider firewalls. A firewall on your computer, on the other computer, or on the network between them can block the port. On a work or school network, your IT team may block outgoing Telnet on purpose.
  • Run the Test-NetConnection command from the previous section. If it also fails, the problem is the network or the remote service, not Telnet.

You cannot see what you type

Some services do not send your typing back to the screen. Press Ctrl+], type set localecho, and press Enter to turn on local echo.

Telnet Client will not install, or the option is unavailable

You need an administrator account to add Windows features. On a computer managed by an employer or school, optional features may be restricted, so ask your IT team to add Telnet Client or to run the port test for you. If the DISM command is refused, check that the Command Prompt window was opened as an administrator.

You are stuck in a session and cannot get out

Press Ctrl+] to reach the Telnet prompt, then type quit and press Enter. To drop the connection but keep Telnet open for another test, type close instead.