Security
Risk: Critical

Port 23 β€” Telnet Remote Terminal

Port 23 is the historical standard port for the Telnet protocol, providing unencrypted, cleartext remote command-line access to network equipment, routers, and legacy Linux/Unix hosts.

PORT NUMBER

23

PROTOCOL

TCP

DEFAULT PROCESS

telnetd, in.telnetd

FIREWALL TARGET

23/tcp

Instant Terminal Fixes for Port 23

macOS & Linux Terminal
1. Check who is listening on port 23:
sudo lsof -i :23 || sudo ss -tulpn | grep ":23 "
2. Kill process occupying port 23 (EADDRINUSE fix):
sudo systemctl stop telnetd || sudo killall in.telnetd
3. UFW Firewall Allow rule:
sudo ufw deny 23/tcp
Windows PowerShell (Admin)
1. Check listening port:
Get-NetTCPConnection -LocalPort 23
2. Force kill process on port 23:
Stop-Service -Name TlntSvr -Force -ErrorAction SilentlyContinue
3. Docker Port Forwarding Mapping:
# Telnet should not be containerized; use SSH or secure bash sessions instead

Common Error Encountered

Connection closed by foreign host / Telnet connection refused on port 23.

Security Advisory & Hardening

Telnet transmits usernames, passwords, and commands in plaintext across the network. It should be completely disabled and replaced with SSH (Port 22).

Frequently Asked Questions

Port 23 Questions & Answers

Common questions regarding default services, kill commands, and firewall configurations.

Port 23 is commonly used for Telnet Remote Terminal. Port 23 is the historical standard port for the Telnet protocol, providing unencrypted, cleartext remote command-line access to network equipment, routers, and legacy Linux/Unix hosts.