Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

on Windows XP/server 2003

When telnet some remote host on a specified port, after connection established, sometimes press ctrl+] doesn't quit. Is there any command can quit instead of just close the command line window? Thanks.

EDIT: But sometimes even type ctrl + ], telnet command line doesn't show up, still stuck at the blank screen.

share|improve this question
add comment

8 Answers 8

ctrl+] is an escape sequence that puts telnet into command mode, it doesn't terminate the session. If you type close after hitting ctrl+], that will "close" the telnet session.

share|improve this answer
add comment

You can use the 'quit' command, or abbreviate it to just 'q' if you like.

share|improve this answer
add comment

on German keyboards the following keystrokes will help

ctrl +
Strg +

('ctrl' plus '+' or rather 'Strg' plus '+'

share|improve this answer
add comment

maybe with ctrl + d ?

share|improve this answer
add comment

ctrl+] will take you to command mode if the telnet client is already connected; from there you can type (q)uit to exit.

If it's connecting, however (or failing to connect...), then there is no way to interrupt the process until it times out.

share|improve this answer
add comment

I'm not terribly familiar with Windows telnet, but I note that local behavior on non-Windows boxes using telnet is a combination of the telnet state and that of the terminal or enclosing window and shell. That is, if your remote connection has changed the echo mode, or font color, or interrupt status, etc. killing telnet has no effect on that local status.

Does Windows have similar local status? I assume so, or most text editors and many other programs wouldn't work in telnet windows.

For Unix, the typical sequence was ctrl+]quit[return] stty sane[return] to get local control and tty sanity. What's the Windows equivalent of "tty sane"?

share|improve this answer
add comment

Standard way of disconnecting the line in most applications is ~+., keep in mind, that often this has to be typed in blindly, so press enter a couple of times: Enter+~+..

This is also the standard way of closing the connection on an SSH session, that became unresponsive.

share|improve this answer
add comment

At least in my Linux system, the only way to exit from a telnet session is by using the following keys (pressing the 3 keys together: Ctrl, AltGr,+ and then the following prompt appears: telnet> Now press the key q and the telnet session will be terminated.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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