I start telnet by telnet host port. How do I stop it in Windows? Shockingly, Ctrl+C doesn't work.
- 61,800
- 1
6 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.
-
37on Windows, run telnet with out arguments to see what the escape character is. On some localized Windows versions where ] is only available with
Alt Grkey, the key combination isCtrl++. – mihi Oct 11 '12 at 18:24 -
44As far as I remember Ctrl+5 was equivalent with ^] on my (Norwegian) keyboard. – hlovdal Oct 12 '12 at 08:34
-
8
-
42
-
3Doesn't work. It says:
Microsoft Telnet> ^]and next line shows:Invalid Command. type ?/help for help– Pacerier Jul 03 '15 at 04:19 -
2
-
From CMD write telnet "hostip/name" "portnumber" then do disconnect. Press down the CTRL key and another random key on the keyboard until you find the correct one. And then write "quit" press enter. – ColacX Sep 22 '15 at 13:06
-
I never noticed that before... amazing whats right in front of your face – WernerCD Sep 25 '15 at 15:13
-
It's CTRL+$ (i tested this on windows 10)
This is the output from my console:
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+$'
Microsoft Telnet> quit
C:\WINDOWS\system32>
– Kris Nobels Dec 14 '15 at 23:33 -
2
-
18
-
@Krycke The same for Swiss Keyboard, the key
]must be used withAltGrbut for that purpose, we just press theCtrl+¨– рüффп Mar 22 '16 at 10:29 -
-
-
2On my Mac with Norwegian keyboard,
]isAlt+9. TypingCtrl+Alt+9yields9and is not recognised by telnet as escape character. I had to switch to U.S. input source underKeyboard-->Input Sourcesto be able to typeCtrl+]. – rlovtang May 04 '17 at 10:30 -
To add to rlovtang's answer: The ] character on US keyboard layout is what is marked as the ^¨ key on the norwegian keyboard. – Magne Sep 01 '17 at 08:15
-
1actually, I discovered that you don't have to switch keyboard layout. With the norwegian layout it's as easy as typing:
ctrl + åas you can see in the quoted answer below. Solution in other keyboard language layouts is also listed there. – Magne Sep 01 '17 at 08:33 -
-
2
-
On danish keyboard for windows: As with @rlovtang suggestion of switching keyboard. Alt + Shift to switch keyboard language or select directly in the buttom right corner of the Task Bar. Then ctrl + ¨ (where ¨ results in ]) – Sonaten Oct 25 '18 at 11:27
-
1with german keyboard layout on macos
CTRL+OPTION+6then type close and enter – muuvmuuv Jun 17 '19 at 12:00 -
-
-
2
-
On a Mac with German layout, type ctrl-option-6 (where option-6 gives
]) to get into command mode, then typequit+ return. – SuperTempel Oct 30 '20 at 09:40 -
-
1
-
this does NOT work all the time....the next answer
quitdoes work all the time – uberrebu Nov 18 '21 at 03:39 -
-
-
I always forget about this! why is so different? :(:( thanks!! it wokrs on ubuntu too. – Rodrigo Oct 17 '22 at 20:19
-
Protip: Use On-screen keyboard to figure out where that bloody
]is located with current keyboard layout :) – jgangso Dec 02 '22 at 10:18 -
-
11
-
7
-
-
-
-
15@Alexander you have to press
Ctrl + ]and only then whentelnet>prompt appears enterquit. – Gacha Dec 29 '15 at 11:58 -
5For some reason I get
Microsoft Telnet> ^] Invalid Command. type ?/help for helpbutquitworks. Thanks. – Charles Clayton Feb 09 '16 at 00:41 -
This applies to the telnet interpreter, and not to a running telnet connection, that was asked for – oo_dev Jul 24 '19 at 11:44
The
^]means ctrl + right bracket. As strange as that is, it works. You'll be taken to the telnet prompt, where you can typequitor 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.
- 756
-
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 – Diego Tercero Dec 12 '17 at 13:19
-
8
-
4
-
2
-
Doesn't seem to work in Portuguese. (Windows 10). Also, telnet says the escape char is ']', not '^]'. – D. Pardal Jul 13 '19 at 10:23
-
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]– Magne Sep 21 '19 at 12:33 -
1Thank @GustavoAriasMéndez in Spanish keyboard using SSL terminal conected to unix, control + 5 works! – Hernaldo Gonzalez Oct 29 '19 at 16:54
-
-
On Linux (including WSL) you can run
showkey -ato check the characters which a terminal application receives. You can then try to press various key combinations to find^]. See https://askubuntu.com/a/1366082/67132 – pabouk - Ukraine stay strong Sep 27 '21 at 14:56 -
-
If you use Czech layout,
Ctrl+Alt Gr+Gis the escape key. Note you can maketelnetuse any escape key you like, with the -e option, e.g.-e ^Ffor Ctrl+F key. – akwky Jan 12 '22 at 10:53 -
@dominikandreas Slightly of topic: On Linux (Ubuntu) I have to choose the combination Strg+AltGr+9 (Strg++ is mapped only to "+"). – Johann Klasek Jul 26 '22 at 17:58
-
On debian 9, typing :
Ctrl + $
Allows you to show the prompt from telnet, then only type :
q
To exit
- 211
"How do I stop it in Windows?"
I miss the good old ALT + 29 ¹ on the numeric keypad. And then "quit". This works since DOS and (should) work across all KB layouts in windows. Tested 2023 with a Greek Island layout on windows 11.
¹ With ALT + number on numpad you get all ASCII codes.
^A is 1, ^B is 2 … ^[ is 27 (as ESC) and finally ^] is 29
ALT + 64 -> @
ALT + 64 -> A
- 123
-
Upvoted: Tested, worked on a Simplified Chinese keyboard in Windows 11. – Geno Chen Nov 21 '23 at 03:29
telnetpredates Windows, and Microsoft had excellent UI standards in the 80s and 90s. – Cees Timmerman Jan 07 '16 at 13:07