Telnet Port Testing: The Old Trick That Still Helps

Run a Speed Test

Telnet is obsolete as a remote login protocol, but the client is still useful for one narrow task: testing whether a TCP port accepts a connection.

Quick Answer

Use telnet only as a quick TCP port check: telnet host port. If the screen connects or goes blank, the TCP connection succeeded. If it times out or refuses, the port is blocked, closed, or unreachable. That single binary answer — connected vs. not — is why telnet is still useful 40 years after it was designed.

How to Install Telnet

OSInstall CommandNotes
Ubuntu / Debiansudo apt install telnetInstalls the client only
RHEL / CentOS / Fedorasudo dnf install telnetClient only
macOSBuilt-in on older macOS; brew install telnet on newermacOS removed it in 10.13+
Windows 10/11Settings → Optional Features → Telnet ClientOr use PowerShell Test-NetConnection instead

Examples

# Test if a web server is listening on port 80
telnet example.com 80

# Test SMTP on a mail server
telnet mail.example.com 25

# Test SSH on a local device
telnet 192.168.1.10 22

# Test a custom application port
telnet 10.0.0.5 8080

After connecting to port 80, you can manually type an HTTP request — but curl -v does this better with TLS support and structured output.

How to Interpret Results

ResultMeaningNext Step
Connected / blank screenTCP handshake succeeded — something is listeningService is reachable; investigate application layer if still broken
Banner text appearsServer sent an application greeting (SMTP, FTP, SSH)Service is fully functional at the port level
Connection refusedHost is reachable but nothing is listening on that portCheck if the service is running; check the correct port number
Connection timed outFirewall dropping packets, routing issue, or host is downPing the host; check firewall rules on both ends
Name or service not knownDNS resolution failedTry with IP address directly; check DNS configuration

Common Ports to Test

PortServiceWhat a Successful Connection Means
22SSHSSH daemon running; firewall allows connection
25SMTPMail server accepting connections (banner should appear)
80HTTPWeb server running unencrypted; blank screen until you send a request
443HTTPSTLS — telnet connects but you will see garbled data; use curl instead
3389RDPWindows Remote Desktop accepting connections
5900VNCVNC server running
8080HTTP (alt)Application or proxy server on non-standard port

Modern Alternatives

Telnet works, but these tools give cleaner output for the same port-testing job:

# nc (netcat) — cleaner output, exits cleanly
nc -vz example.com 80
nc -vz 192.168.1.10 22

# curl — best for HTTP/HTTPS port and header testing
curl -v https://example.com/
curl -v --connect-timeout 5 http://192.168.1.10:8080/

# PowerShell (Windows) — no install needed
Test-NetConnection -ComputerName example.com -Port 80
Test-NetConnection -ComputerName 192.168.1.1 -Port 443

# nmap — most powerful, tests ranges of ports
nmap -p 22,80,443 example.com
ToolBest ForAvailability
telnetQuick binary port check with interactive responseOptional on all major OS
nc (netcat)Scripted port checks, cleaner exit codesMost Linux/macOS; needs install on Windows
curlHTTP/HTTPS testing with full request/response detailBuilt-in on macOS and most Linux; included in Windows 10+
Test-NetConnectionWindows port testing without third-party toolsBuilt into Windows PowerShell
nmapMulti-port scanning, service detectionInstall separately; comprehensive

Frequently Asked Questions

Is telnet secure?

Telnet as a remote login protocol is completely insecure — all traffic including passwords is sent in plain text. However, using the telnet client to test a TCP port is safe because you are only checking connectivity, not sending credentials. The risk is zero as long as you are not using telnet to actually log into a remote system.

Why is telnet not installed on Windows by default?

Microsoft removed it from default installs to reduce the attack surface — leaving telnet enabled as a server was a common misconfiguration. The client is still available as an optional feature. For port testing on Windows, PowerShell's Test-NetConnection is the better built-in alternative.

What does a blank telnet screen mean?

The TCP three-way handshake completed successfully and the server accepted the connection. The blank screen means the server is waiting for you to send something first (as HTTP, SMTP after EHLO, etc.). If you see text immediately, the server sent a banner — this is normal for SMTP, FTP, and SSH. Quit with Ctrl+] then type quit.

Why use nc instead of telnet?

nc -vz host port exits immediately after confirming the connection, returns a proper exit code (0 for success, 1 for failure) that scripts can use, and does not leave a hanging interactive session. For any automated testing or scripting, nc is the better tool. For interactive exploration where you want to type commands at the server, telnet is still fine.

Related Guides

More From This Section