DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
VGSources
Blog

How to Use the Telnet Command in Linux

A practical Linux telnet guide covering Ubuntu installation, syntax, interactive controls, TCP port checks, troubleshooting, and the security limits that make SSH the right choice for administration.
WorldLinux Length10 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Linux’s telnet client to open a TELNET session or make a basic TCP connection test to a host and port. Install the inetutils-telnet package on Ubuntu, run telnet host port, and interpret the result as network-level evidence—not proof that the application is healthy. Telnet is unencrypted, so use SSH for administration and any session containing credentials or sensitive data.

What the telnet command does

Telnet is a command-line user interface for the TELNET protocol. The protocol was designed as a general, bidirectional, eight-bit, byte-oriented way to interface with terminal devices, as defined in RFC 854 (1983). On Linux, the client can be used in two distinct ways:

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Interactive TELNET session: provide a host, optionally with a port, and the client opens a connection.
  • Interactive command interpreter: run telnet without a host, then use commands at the telnet> prompt.

The command is also useful for a narrowly scoped diagnostic: connecting to a TCP port used by another service. In that case, the connection demonstrates that a route exists and that something accepted the TCP connection; it does not validate the service’s complete protocol, authentication, or security configuration.

Only connect to systems and services you own or are explicitly authorized to test. A telnet session is not encrypted, and the current Linux client does not provide encryption.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Install telnet on Ubuntu and other Linux distributions

Ubuntu

Ubuntu Noble supplies the executable in the inetutils-telnet package, documented as version 2:2.5-3ubuntu4.2 for that release. Install it with APT:

sudo apt update
sudo apt install inetutils-telnet

Then verify that the command is available:

telnet --help
man telnet

The exact package revision can change as Ubuntu publishes updates. The important point is the package name; APT will select the revision available for your configured repositories.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Debian and other distributions

Package names and repository policies differ. Search your distribution’s package index for the Telnet client, install it with the normal package manager, and confirm with telnet --help or man telnet. Do not assume that a server daemon is installed: the client and a TELNET server are separate components, and most current systems should not expose a Telnet server to an untrusted network.

If the command is still missing

  • Check the spelling: the executable is telnet, not telnetd (the latter refers to a server component on systems that provide one).
  • Run command -v telnet to see whether it is on your PATH.
  • Read the local manual page because options and escape behavior can vary between implementations.
  • If your organization removes Telnet packages under a security baseline, use an approved diagnostic tool instead of bypassing that control.

Telnet syntax and first connections

The general form documented by Debian and Ubuntu is:

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
telnet [options] [host [port]]

Connect using the service’s default port

telnet example.com

With a host but no port, the client performs an open operation implicitly. For a normal TELNET service, the conventional port is 23, but the client does not make every host a Telnet server merely because no port was written. The remote endpoint must be listening and reachable.

Connect to a specific TCP port

telnet example.com 25

This opens a TCP connection to port 25, commonly associated with SMTP. You will see whatever the service sends after accepting the connection. Telnet does not turn that byte stream into a valid SMTP conversation; you must understand the protocol before typing commands.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start at the command prompt

telnet

The client starts an interpreter and displays a telnet> prompt. From there, connect with:

telnet> open example.com 23

Running open from the prompt is equivalent to supplying the host when launching the program, while leaving you in the interpreter when the connection closes.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Useful command-line options

GNU inetutils-based clients document these commonly useful options. Confirm the spelling and behavior on the machine you are using:

Option Purpose When to use it
-4 or --ipv4 Force IPv4 address selection. When IPv6 routing or firewall policy is failing and you want to isolate an IPv4 test.
-6 or --ipv6 Force IPv6 address selection. When you need to verify the IPv6 path independently of IPv4.
-8 or --binary Use an eight-bit data path. When the service requires binary data rather than a traditional seven-bit terminal stream.
-e or --escape Set the escape character. When the default escape key conflicts with the application or your terminal workflow.

For example, an IPv4-only connection to a nonstandard port is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
telnet -4 example.com 8080

Options are implementation-specific enough that telnet --help and the local manual page should be treated as authoritative. An option accepted by one Telnet client may be absent or behave differently in another.

Control an interactive session

When you start telnet without a host, or escape from an active connection, these interpreter commands provide the basic controls:

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Command Action
open host [port] Connect to a host, optionally specifying a TCP port.
close End the current connection but remain at the telnet> prompt.
display Show current client settings, such as negotiated or configured modes.
send Transmit a TELNET control sequence selected by the implementation.
? Display help for available interpreter commands.
quit Exit the Telnet interpreter.

Leave a connection without closing the program

The default escape character is commonly entered with Ctrl-]. That key sequence does not necessarily close the network connection; it switches from the connected byte stream to the telnet> command prompt. You can then type close to disconnect and keep the interpreter open, or quit to exit.

^]
 telnet> close
 telnet> quit

The displayed caret is how many terminals represent Ctrl-]; do not type the caret and bracket as ordinary characters. If the sequence does not work, run ? or consult the local manual page. The configured escape character may have been changed with -e, and terminal multiplexers can intercept control keys.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use telnet as a basic TCP port test

What a successful connection proves

Run:

telnet server.example 443

If the client reports that it connected, the name resolved to an address, packets reached the destination, and a process accepted the TCP connection on that address and port. This is useful for checking a firewall change, a listener startup, or a route between two hosts.

When the destination port is not the Telnet port, the Debian documentation says the client does not attempt TELNET protocol negotiation. The resulting connection is therefore a simple interactive TCP byte stream, which can be useful for services that speak a different protocol. The documented client also provides a dash form that can force protocol negotiation before the port; because the exact syntax is implementation-dependent, inspect man telnet or telnet ? before using it.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

What a successful connection does not prove

  • It does not show that the application protocol is healthy or that the service will answer a valid request.
  • It does not verify authentication, authorization, certificates, or application-level permissions.
  • It does not prove that traffic works in the reverse direction or from every client network.
  • It does not test TLS encryption merely because the port number is commonly used for TLS.

Examples for common services

Goal Command Interpretation
Check an SMTP listener telnet mail.example 25 A banner or an open socket indicates that TCP port 25 accepted the connection. Use an SMTP-aware test for commands, authentication, and delivery behavior.
Check an HTTP listener telnet web.example 80 An open socket indicates reachability. To test HTTP semantics, send a correctly formatted request or use an HTTP-aware client.
Check a TLS endpoint telnet web.example 443 An open socket alone says nothing about the TLS handshake. Use a TLS-aware client such as openssl s_client for certificate and handshake details.
Check a custom service telnet app.example 9000 Useful for a basic listener check when the service owner has provided a safe test procedure.

Why the screen may look blank or garbled

Many services wait for a client greeting, send no banner, or immediately close connections from unknown sources. Binary protocols and TLS produce characters that are not readable in a terminal. Those outcomes do not automatically mean the port is broken; they mean Telnet is the wrong layer for interpreting the protocol.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Diagnose common connection results

Observed result Likely meaning Next check
Connection refused The host was reachable, but no process accepted the connection on that address and port, or an active device rejected it. Confirm the service is listening on the expected address and port and check host firewall rules.
Connection timed out No response arrived before the client’s timeout; filtering, routing, an offline host, or a silently dropped packet is possible. Test name resolution, route selection, and firewall policy from the same client network.
Name-resolution error The hostname did not resolve to an address usable by the client. Check DNS records, search domains, and whether the intended address family is IPv4 or IPv6.
Immediate disconnect The listener accepted the TCP handshake and then closed, often because the protocol greeting, source address, or authentication policy was unacceptable. Use the service’s protocol-specific diagnostic and inspect its logs.
Connection works with -4 but not -6 The service or network path differs between address families. Check AAAA records, IPv6 routes, listener bindings, and IPv6 firewall rules.
A prompt appears but typed characters behave oddly Terminal modes, TELNET negotiation, or the selected escape character are affecting input. Run display, consult ?, and verify the local manual page.

Repeat a test from the network where the failure occurs. A port reachable from a server’s own shell may still be blocked from a user VLAN, VPN, cloud security group, or external address.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Telnet versus SSH and protocol-aware tools

Choose the tool according to the question you need answered, not simply according to which command is installed.

Tool Encryption and credentials Best use Important limitation
Telnet The documented client does not support encryption. Controlled legacy access or a basic interactive TCP reachability check. Sessions and data are exposed to anyone able to observe the path; it is unsuitable for secure administration.
SSH Provides an encrypted administrative session and stronger security controls. Remote shell access, file operations, and commands that may include credentials or sensitive data. The SSH service must be installed, configured, and reachable on its own port.
openssl s_client Speaks TLS and can display handshake and certificate details. Testing a TLS endpoint. It is not a general-purpose remote shell and requires TLS-specific options for some protocols.
HTTP-aware client Understands HTTP and, when configured, HTTPS. Checking status codes, headers, redirects, and request behavior. It does not replace a raw TCP test when you specifically need to isolate transport reachability.

The cited CIS Red Hat Enterprise Linux benchmark recommends that the Telnet client not be installed and identifies SSH as the encrypted alternative. Follow your organization’s baseline even when Telnet would be convenient for a one-off check.

Security rules for using telnet

Never use it for routine administration

Telnet’s protocol goal is terminal communication, not confidentiality. The Linux client’s lack of encryption means commands, output, and any credentials entered into the session can be observed or altered by an attacker who can monitor or interfere with the connection. Use SSH for remote administration.

Limit diagnostic use

A short connection test can be reasonable in an isolated lab, on a controlled legacy network, or when an administrator has specifically authorized it. Prefer a tool that understands the target protocol when one is available, and avoid sending credentials or production data through a Telnet session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Protect the endpoint, not just the command

  • Run tests from an approved host and record the destination, port, time, and reason for the test.
  • Do not scan ranges or probe third-party systems without written authorization.
  • Close the session when the test is complete; use close or quit rather than leaving an open terminal connected.
  • Remove the client if policy requires it and no approved workflow needs it.

A practical, low-risk workflow

  1. Define the question. Decide whether you need a TCP reachability check, an HTTP response, a TLS handshake, or a secure shell. Telnet answers only the first question reliably.
  2. Confirm authorization. Identify the owner of the host and port and obtain permission before connecting.
  3. Verify the client. Run telnet --help; if it is absent on Ubuntu, install inetutils-telnet through APT.
  4. Choose the address family. Use the default first, then -4 or -6 if you need to isolate IPv4 and IPv6 behavior.
  5. Test the exact endpoint. Run telnet host port with the hostname and port supplied by the service owner.
  6. Interpret only the transport result. Record whether the connection was accepted, refused, timed out, or immediately closed; do not treat an open socket as an application-health result.
  7. Switch tools for higher layers. Use an HTTP-aware client for HTTP, openssl s_client for TLS, and SSH for encrypted administration.
  8. Exit cleanly. Press Ctrl-] when supported, then run close or quit. Check the local help if your implementation uses a different escape character.

When telnet is the wrong choice

Do not use Telnet simply because a service has a familiar port number. A port-443 connection needs a TLS handshake; a port-25 connection may require SMTP commands and authentication; and an application protocol may reject arbitrary text after accepting the socket. In each case, Telnet can establish a preliminary network fact, but a protocol-aware client supplies the evidence needed for a meaningful service test.

For remote login, the decision is simpler: use SSH. Telnet’s unencrypted transport and the security guidance against installing the client make it inappropriate for routine administration, even on an internal network.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.