How to Properly Exit a Telnet Session (Most People Get This Wrong)
If you've ever used Telnet, you’ve probably faced this frustrating moment:
👉 You’re done with your session… but you can’t exit.
You try:
exitCtrl + CCtrl + Z
…and nothing works 😅
Don’t worry — you’re not alone. This is one of the most common issues beginners (and even experienced users) run into when using Telnet.
🚫 Why exit or Ctrl+C Doesn't Always Work
Telnet works differently from a normal shell.
When you're connected:
- You're interacting with a remote system or service
- Your commands are sent inside the session, not to your local terminal
So:
exit→ may not be recognized by the remote serviceCtrl + C→ might interrupt a process, but not close TelnetCtrl + Z→ just suspends the process (on some systems)
✅ The Correct Way to Exit Telnet
There’s a special escape sequence you need to use.
Step-by-step:
1. Press:
Ctrl + ]
👉 This will take you to the Telnet prompt:
telnet>
2. Then type:
quit
3. Press Enter
🎉 You’re out!
💡 Quick Shortcut Summary
| Action | What to Press |
|---|---|
| Open Telnet prompt | Ctrl + ] |
| Exit Telnet | quit |
🧠Pro Tip
The Ctrl + ] key is called the Telnet escape character.
Once you enter the telnet> prompt, you can also:
close→ close current connectionquit→ exit Telnet completely
⚠️ Common Mistake
Many users keep typing exit repeatedly thinking the session is frozen.
👉 It’s not frozen — you’re just still inside the Telnet connection.
✍️ Final Thoughts
Telnet may be old, but it's still used for:
- Testing ports
- Debugging services
- Learning networking basics
Knowing how to properly exit saves time and avoids confusion.
👉 Just remember: Ctrl + ] → type quit → done.

Comments
Post a Comment