Securing an exposed Telnet device: what to do beyond turning it off
Disabling Telnet closes the most dangerous gap immediately, but devices that genuinely need remote command-line access still need an answer for what replaces it, and devices that can't be fully replaced or patched yet still need network-level controls in the meantime. AdminKit explains how to check your own exposure and migrate to SSH instead.
By AdminKit team, Netbase JSC · Updated
Key takeaways
- Telnet sends everything, including the login password, as plaintext; anyone who can see the traffic can read it.
- Disable Telnet, but plan what replaces it — usually SSH with key-based login — or administrators will switch it back on.
- Change default credentials on every interface the device still exposes, not just the one you started with.
- Devices that can’t run SSH belong on a management VLAN or behind a VPN, with a date for replacement.
- Re-check after firmware updates and factory resets, which can quietly bring Telnet back.
Is turning Telnet off enough?
Disabling Telnet is the right first move, and for devices where it was enabled by accident or isn’t actually needed, it’s close to the whole fix. But a meaningful number of devices run Telnet because it’s the only remote command-line interface the firmware offers, and simply switching it off removes administrators’ ability to manage the device at all — which in practice means people often turn it back on the moment they need to troubleshoot something, undoing the fix. A durable answer needs to cover what replaces Telnet’s functionality, not just that it gets disabled.
Why is an exposed Telnet login so risky?
RFC 854 describes a way to carry a terminal session over TCP; it doesn’t define how a user proves who they are. The login prompt you see comes from the device itself, which simply reads a username and password typed into the plaintext session. That design leads to three separate ways in:
- Reading the password off the network. Anyone who can capture traffic between the administrator and the device — on shared Wi-Fi, a compromised switch, or any hop in between — sees the credential as typed.
- Default credentials. Many devices ship with a documented factory login. If no one changed it, the manual is the password list.
- Guessing. Nothing in the protocol limits login attempts; any lockout or delay depends entirely on the device firmware.
What a successful login grants depends on the device, but Telnet is usually the administrative interface: someone who gets in can typically change the device’s configuration, add accounts, read stored credentials, or use the device to reach other machines on the same network. That is why exposure from anywhere outside a small, trusted admin network deserves attention, even when nothing has gone wrong yet.
Step 1: Where is the device reachable from?
Before changing anything, confirm your starting point with AdminKit’s port check tool against your own public IP (use what is my IP first to confirm that address), and separately check whether Telnet is reachable from elsewhere on your own local network, which a port check against your public IP won’t reveal. Devices on a shared or guest network segment can be reachable to more than you’d expect even with no internet exposure at all.
From a machine on your own LAN, a plain TCP connection test shows whether the Telnet port answers. The address below is an example; use your device’s own:
$ nc -vz -w 3 192.168.1.20 23
Connection to 192.168.1.20 23 port [tcp/telnet] succeeded!
A refusal or a timeout from inside the LAN, combined with a closed result from the external port check, means Telnet isn’t reachable from either place. Test from each network segment that should not be able to reach the device’s management interface, such as guest Wi-Fi.
Step 2: Why is SSH the replacement for Telnet?
RFC 854 (also on the IETF Datatracker) defines Telnet as a plaintext protocol with no encryption and, in most implementations, no strong authentication beyond a static password. SSH, specified across RFC 4251 and its companion RFCs, was built specifically to replace this kind of remote shell access with an encrypted channel and support for key-based authentication, which removes the single-password-guess risk that makes Telnet dangerous at scale. If a device’s firmware offers SSH alongside Telnet, migrate fully and disable Telnet rather than running both — a disabled-but-present Telnet service is still an attack surface if it can be re-enabled.
The difference is in what each protocol protects, not just in the port number:
| Property | Telnet (RFC 854) | SSH (RFC 4251, RFC 4252) |
|---|---|---|
| Default port | 23/tcp | 22/tcp |
| Encryption of the session | None | Whole session encrypted |
| Password on the network | Readable in transit | Sent only inside the encrypted channel |
| Key-based login | Not part of the protocol | Public-key authentication defined in RFC 4252 |
| Proof of server identity | None | Server host key, checked by the client |
Where the device runs OpenSSH or a compatible server, set it up for key-based login and switch off passwords once the keys work. On the administrator’s machine:
ssh-keygen -t ed25519 -f ~/.ssh/device-admin
ssh-copy-id -i ~/.ssh/device-admin.pub admin@192.168.1.20
Then, in the device’s sshd_config, using directives documented in the OpenSSH sshd_config manual:
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin no
ListenAddress 192.168.1.20
Keep a second session open while you reload the SSH service, so a mistake in the file doesn’t lock you out. Many embedded devices expose only a vendor menu for SSH settings rather than this file; the same goals apply — keys rather than passwords where offered, and no root login.
Step 3: Which credentials need changing?
Whether the device ends up using SSH, a web admin panel, or nothing beyond local console access, default or weak credentials undo every other control. Change the administrative credential on every interface the device exposes, not just the one you were originally worried about — a secured Telnet replacement with a default password on its web interface hasn’t actually closed the gap.
Use a unique credential per device, stored in a password manager the whole admin team can reach. A credential reused across a fleet of identical devices turns one extracted password into access to all of them.
Step 4: What if the device can’t run SSH?
Some embedded devices genuinely can’t be updated to support SSH and won’t get a firmware update that adds it. For these, the fix has to happen around the device rather than on it:
- Keep any remote administration interface off the public internet entirely — no port forward, no UPnP-created mapping, under any circumstance.
- Restrict access to a dedicated management VLAN or a VPN, so reaching the device’s admin interface at all requires already being on a trusted, authenticated network path.
- Treat the device as having a defined replacement timeline rather than indefinite “compensating controls” — CISA’s BOD 23-02 frames exactly this kind of internet-exposed management interface as something to remove from direct exposure or place behind strong access control within a defined window, not something to leave indefinitely with partial mitigations.
Each network-level control narrows who can reach the device, but none of them makes Telnet itself safe:
| Control | What it achieves | What it doesn’t fix |
|---|---|---|
| Remove port forwards and UPnP mappings | Takes the device off the public internet | Anyone on the LAN can still connect |
| Management VLAN with firewall rules | Only admin machines can reach port 23 | Passwords still cross that VLAN in plaintext |
| VPN required for remote admin | Remote access needs a separate login first | The Telnet hop behind the VPN stays unencrypted |
| Replacement date | Ends the exposure | Needs budget and a migration plan |
Step 5: What else is the device listening on?
A device that shipped with Telnet enabled by default often shipped with other unnecessary services enabled too — an outdated web admin panel, an unauthenticated API, a diagnostic port never meant for production use. Review the device’s full set of listening services, not just the one you already knew about, since fixing Telnet alone can leave an equally serious gap sitting one port over.
These are the services most often found alongside Telnet on embedded devices, with the guide that covers each:
| Port | Service | Why it matters | Guide |
|---|---|---|---|
| 21/tcp | FTP | Plaintext logins, like Telnet | Is port 21 exposed? |
| 22/tcp | SSH | The replacement, but needs its own hardening | Is port 22 exposed? |
| 554/tcp | RTSP | Camera video streams, often without a login | Telnet and RTSP camera exposure |
| 1900/udp | SSDP/UPnP | Can open port forwards on the router by itself | mDNS, SSDP and UPnP leaks |
Step 6: How often should you re-check?
Re-run port check after disabling Telnet and again after any firmware update or factory reset — some devices re-enable Telnet or restore a default port-forward rule automatically, which is exactly the kind of silent regression a one-time check won’t catch.
Where else does the same pattern show up?
RDP shares Telnet’s basic risk profile — a protocol built to grant administrative or interactive access, routinely found exposed directly to the internet — even though RDP’s own cryptography is far stronger than Telnet’s complete absence of it. See our guide on hardening RDP exposure for the equivalent checklist on that protocol, and is port 23 (Telnet) exposed for the quick exposure-check version of this page. FTP carries the identical plaintext-credential problem on a different port, and once you’ve migrated off Telnet, confirm the replacement itself isn’t left misconfigured with is port 22 (SSH) exposed.
Defensive use only
Every check this guide links to is for devices and networks you own or are explicitly authorized to test. Never scan, probe, or attempt to connect to a device you don’t control — AdminKit’s active checks only ever run against the IP making the request or an asset you’ve verified ownership of. See our Disclaimer and Acceptable Use Policy for the full terms.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
If I've already disabled Telnet, am I done?
You've closed the single most common path to a full administrative shell, which is the most important step. But if the device still has other exposed services, outdated firmware, or default credentials on whatever admin interface replaced Telnet, the underlying weaknesses that made Telnet dangerous in the first place are often still present elsewhere on the device.
What should replace Telnet for devices that genuinely need remote command-line access?
SSH, defined across RFC 4251 and related RFCs, provides the same kind of interactive remote shell access but with encryption and strong authentication built into the protocol itself, including support for key-based authentication instead of passwords alone — a meaningful upgrade over Telnet sending credentials in plaintext.
What if the device doesn't support SSH and can't be upgraded?
This is common on older or cheap embedded hardware, and the fix has to move to the network layer: keep any form of remote administration off the public internet entirely, restrict it to a dedicated management network or VPN, and treat the device as a candidate for replacement on a defined timeline rather than something to leave running indefinitely with compensating controls alone.
Does CISA have guidance specific to exposed management interfaces like this?
Yes — CISA's Binding Operational Directive 23-02 addresses internet-exposed management interfaces broadly, requiring federal agencies to either remove them from direct internet exposure or put strong access controls in front of them within a defined window. The same principle applies well beyond federal networks: a management interface, Telnet or otherwise, shouldn't be the first thing an internet scan finds.
How do I check whether a device I've already 'fixed' is still reachable?
Re-run a port check against your own public IP after making changes, rather than assuming a configuration change took effect — some devices re-enable Telnet or re-create a port forward automatically on reboot or firmware update, which is exactly the kind of regression a one-time fix won't catch.
Sources
- RFC 854 — Telnet Protocol Specification
- RFC 4251 — The Secure Shell (SSH) Protocol Architecture
- CISA — BOD 23-02: Mitigating the Risk from Internet-Exposed Management Interfaces
- RFC 854 — IETF Datatracker document record
- RFC 4252 — The Secure Shell (SSH) Authentication Protocol
- OpenSSH — sshd_config(5) manual
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.