I start telnet by telnet host port
. How do I stop it in Windows? Shockingly, Ctrl+C doesn't work.
5 Answers
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.
-
35on 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 isCtrl
++
.– mihiOct 11, 2012 at 18:24 -
42As far as I remember Ctrl+5 was equivalent with ^] on my (Norwegian) keyboard.– hlovdalOct 12, 2012 at 8:34
-
7
-
37
-
16
Type quit
to exit telnet in windows.
-
11
-
6
-
-
12@Alexander you have to press
Ctrl + ]
and only then whentelnet>
prompt appears enterquit
.– GachaDec 29, 2015 at 11:58 -
4For some reason I get
Microsoft Telnet> ^] Invalid Command. type ?/help for help
butquit
works. Thanks. Feb 9, 2016 at 0:41
The
^]
means ctrl + right bracket. As strange as that is, it works. You'll be taken to the telnet prompt, where you can typequit
or simplyq
.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:
- Norwegian: ctrl + å
- Danish, Finnish, and Swedish: ctrl + ¨ [added by Fredrik C]
- French: ctrl + 6
- German, Turkish: ctrl + ü
- Swiss: ctrl + ¨
- Hungarian: ctrl + 5 or ctrl + ú
- Portuguese: ctrl + ´
- Dutch, Belgian: ctrl + $
- Canadian French: ctrl + ç
- Italian: 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.
-
2French 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 Dec 12, 2017 at 13:19
-
7
-
4
-
2
-
1@D.Pardal The
^
in^]
just refers to the CTRL button, since it is marked by an^
on the keyboard. So it just meansCTRL + ]
so telnet is right that the character itself is just]
– MagneSep 21, 2019 at 12:33
On debian 9, typing :
Ctrl + $
Allows you to show the prompt from telnet, then only type :
q
To exit
telnet
predates Windows, and Microsoft had excellent UI standards in the 80s and 90s.