Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools HTTP Basics Introduction to HTTP HTTP Requests Using Telnet

Can anyone explain what I'm doing wrong? I enabled telnet and when I try to run telnet returns invalid Command.

Can anyone explain what I'm doing wrong? I enabled telnet and when I try to run "telnet httpbin.org 80" telnet returns invalid Command. I am using Windows 10.

4 Answers

Louise St. Germain
Louise St. Germain
19,412 Points

Hi Piotr,

I have Windows 10 also and installed telnet, and I didn't get this error. I can sort of replicate the error, however, if I go into command prompt and type telnet + enter, which opens telnet and gives a telnet prompt. Then if I type telnet httpbin.org 80, I get that invalid command error you were talking about. This is because telnet is already open at this point, and "telnet" is not a valid command inside the telnet application.

Do you get the invalid command error when you type telnet httpbin.org 80 straight into the Windows command prompt?

it says: Welcome to microsoft telnet client. Escape character is "CTRL+ ]" Microsoft Telnet>

and then when I try: Invalid Command. type ?/help for help

What do you think?

I am sorry. I just realized. it's Windows 8.1.

Louise St. Germain
Louise St. Germain
19,412 Points

Hi Piotr,

If have a prompt that says Microsoft Telnet>, you already have telnet open, so the problem is very likely what I mentioned before: telnet is not a valid command within telnet itself; you only use it to open telnet.

If you already have telnet open, then use open httpbin.org 80 instead of telnet httpbin.org 80 to open the connection to httpbin. Hopefully that will work. Note that it will look like it's hanging because it should say Connecting To httpbin.org... but then it doesn't actually signal that it has connected, even if it has. However, when you type your next commands like in the video, you should see them appear at the very top left of your screen, even above where it says Connecting To.... It will probably be overwriting some other stuff that's already there. It's weird that way.

(If you want to try to use the st command, you'll need to hit Ctrl+] once you connect, so that the command is going to your local telnet environment and not as a command to a remote server, which is expecting some sort of GET or POST type of command.)

Let me know if any of that works for you!

Also when I type st (which stands for status) I get response: Not Connected

You were right. It seems to work the way you have described ()at least I made some sort of progress. However after I did what you had said this showed:


Content-Length: 0 Connection: Close

Connection to host lost.

I will keep trying.

I tried doing this same with "open google.com 80" and I got the answer. It feels so good. Again perseverance has paid off. Thank you for your help. You know who you are?

You are my hero!!