Quit telnet – Escape character

Stuck with a telnet session that refuses to give you hand back on console?
No worries… You just have to know the correct command to sort this out!

When you are opening a telnet connection, you probably got something like:

user@server# telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

So, if you want to quit, you just have to use the “escape character” as indicated. But this character is not designed to be typed with 2 characters like “^” and then “]” – you have to use a direct command that can be different depending on your OS:

  • Windows: Ctrl + $
  • Linux: Ctrl + Alt Gr + ]
  • Mac OS: Ctrl + $

And press Enter once you inserted this escape character so you can get the standard telnet prompt and be able to type quit to exit the prompt.

This will result in a command like:

^]
telnet> quit
Connection closed.
user@server#

And here you go – you’re out of telnet 🙂 !