Telnet doesn't accept Enter as a newline

East of Nowhere asked:

I am just trying some really basic Telnet as part of a HTTP tutorial, but everything I’ve read assumes that the Enter key works very differently than how it’s been working for me so far.

So an example like:

>telnet
Microsoft Telnet>o www.bing.com 80
Connecting To www.bing.com...
Microsoft Telnet>GET / HTTP/1.1 [ENTER]
Host: www.bing.com [ENTER]
[ENTER]

Doesn’t work at all for me because as soon as I press Enter key the first time, I immediately get

Invalid Command. type /?help for help

So I never even get the chance to complete the GET command.

I’ve tried having set crlf turned on and off, and that doesn’t make a difference. Tried using Ctrl/Shift/Alt-Enter to get it to put in a newline instead of submitting the command, and no luck.

I’ve googled around a lot, and every tutorial / forum / etc. just assumes that the Enter key puts a LF or CRLF in and that you have to hit Enter twice to submit the command; I haven’t found anything that addresses what to do if that is not the case.

I’m on Windows 7, with Telnet Client featured turned on, in a regular Command Prompt.

My answer:


You were in command mode. Thus you were sending those commands to the telnet client, not to the open connection to the remote host.

To switch back to the open connection, press Enter (alone) at the telnet prompt. (And press Ctrl+] to switch back to command mode.)


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.