248

I start telnet by telnet host port. How do I stop it in Windows? Shockingly, Ctrl+C doesn't work.

  • 10
    Welcome to the trenches, nothing is "shocking" on Windows. – Pacerier Jul 3 '15 at 4:15
  • @Pacerier telnet predates Windows, and Microsoft had excellent UI standards in the 80s and 90s. – Cees Timmerman Jan 7 '16 at 13:07
  • 1
    The reason Ctrl+C doesn't interrupt or suspend the connection is that an interrupt signal or a Ctrl+C often needs to be passed through to the remote end (so you can break programs there, if you're working on a remote shell), which wouldn't be possible if the telnet client intercepted it for its own purposes. – blubberdiblub Jan 12 '17 at 23:15
375

It should have printed something along the lines of:

Escape character is '^]'.

Since ^X is CtrlX, try Ctrl] for ^].

You should then enter the telnet console, where you can enter quit to leave telnet.

  • 15
    on Windows, run telnet with out arguments to see what the escape character is. On some localized Windows versions where ] is only available with Alt Gr key, the key combination is Ctrl++. – mihi Oct 11 '12 at 18:24
  • 19
    As far as I remember Ctrl+5 was equivalent with ^] on my (Norwegian) keyboard. – hlovdal Oct 12 '12 at 8:34
  • 4
    Ctrl+¨ on Windows 7 and sv/fi layout. – mkataja Nov 3 '13 at 0:11
  • 16
    On Ubuntu Ctrl + ], quit worked for me – user1527227 Jun 19 '14 at 20:31
  • 7
    On my swedish keyboard it was Ctrl+¨ – Krycke Mar 16 '16 at 11:05
76

Type quit to exit telnet in windows.

  • 5
    Worked on MacOS X as well ;) – karlingen Jun 13 '14 at 7:13
  • 4
    Also works in Linux. – 에이바 Jan 30 '15 at 18:45
  • From @Isaac: This also works on Windows 8.1. – fixer1234 Apr 20 '15 at 5:21
  • 4
    @Alexander you have to press Ctrl + ] and only then when telnet> prompt appears enter quit. – Gacha Dec 29 '15 at 11:58
  • 2
    For some reason I get Microsoft Telnet> ^] Invalid Command. type ?/help for help but quit works. Thanks. – Charles Clayton Feb 9 '16 at 0:41
11

The ^] means ctrl + right bracket. As strange as that is, it works. You'll be taken to the telnet prompt, where you can type quit.

On international keyboards the ] character is often not a single key, and needs to be replaced with some other key. The correct key is typically the key to the right of P or the next key after that.

Here's a list based on comments below:

  • Finnish, Swedish, Norwegian, Danish: ctrl + å
  • French: ctrl + 6
  • German: ctrl + ü
  • Swiss: ctrl + ¨
  • Hungarian: ctrl + 5
  • Portuguese: ctrl + ´
  • Dutch, Belgian: ctrl + $
  • Canadian French: ctrl + ç

Quote from @jtbandes answer here: https://superuser.com/a/427/192525 All creds to him.

PS: Answer reproduced here for your convenience, since google took me to this question first, and none of the other answers here was sufficient for my case. The question How to send the escape character on OS X terminal? could be seen as a duplicate (more generic version) of this question, since the OP's problems are basically the same.

  • French keyboard here on Win7 with a remote session on a Ubuntu 17.10 VM via Putty. I got the telnet prompt back with ctrl+5 not ctrl+6 – Diego Tercero Dec 12 '17 at 13:19
  • For my German keyboard it's actually ctr++, not ctr+ü – dominik andreas Feb 22 '18 at 12:56
  • If you use Turkish Q on ubuntu CTRL + 5 is the key – Erdinç Çorbacı Oct 12 '18 at 9:03

protected by Community Apr 20 '15 at 6:12

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.