How do I "telnet into [my] favourite Web server"?

0

I'm reading a book about programming, and I want to check an HTTP response message. The book is instructing me

to telnet into your favorite Web server. Then type in a one-line request message for some object that is housed on the server: for example:

telnet cis.poly.edu 80

GET /~hello/ HTTP/1.1
Host: cis.poly.edu

What am I supposed to do, exactly? What program do I need? Where do I need to type this message?

rookie

Posted 2011-02-18T15:58:40.647

Reputation:

2Even though your final intent may be to use the result to guide you in writing some code, this question is entirely about how to use an existing program (telnet), not about programming. – Jerry Coffin – 2011-02-18T16:03:01.867

How old is that book? Telnet is usually turned off nowdays. – Paused until further notice. – 2011-02-18T16:44:30.353

2@Dennis Williamsom: The telnet service is usually turned off, but he's not using the telnet service, he's using a telnet client to access the http service on port 80. – garyjohn – 2011-02-18T17:19:59.890

Answers

5

You can use telnet by opening a terminal and running the command you posted above.

If you are a windows user you go to start -> run then type cmd and hit enter. Once it opens you can type in the command and hit enter.

If you are running a Mac OS, some form Linux, or another operating system you would have to find the terminal and run it from there.

You could also use a client such as putty.

Hope that helps.

Brian Murphy

Posted 2011-02-18T15:58:40.647

Reputation: 151

note that in win7+, telnet must be enabled by adding it: it's a windows feature, so you want "turn windows features on/off". (type that in the start menu, or find it in the control panel) – Michael Lowman – 2011-02-19T05:27:35.713

2

If you are using windows, go to command prompt and type that information. If you are using linux, you should be able to type those commands at command line as well.

Edit for windows: To get to command line, you can click on Start button, click on Run, and type cmd then press enter, or you can hold down windows key (the one with windows logo) and press R, then type in cmd in the new dialog that pops up then press enter.

If you don't want to use built in telnet program, you can go here and download putty, a very powerful telnet client: http://www.chiark.greenend.org.uk/~sgtatham/putty/

Holystream

Posted 2011-02-18T15:58:40.647

Reputation:

2

You need the telnet program, this is included by default in all Windows versions until Vista. If you are on Windows 7 you need to activate telnet.

Albin Sunnanbo

Posted 2011-02-18T15:58:40.647

Reputation: 201

1

telnet cis.poly.edu 80

The above command depicts you connecting your websever through tcp protocol on the port 80 (where your webserver running port) using telnet client service from your machine. Basically telnet client is available in all Windows / Linux machine or you need to enable /install on those OSes.

Telnet server service is another part, where it accepts tcp connection to 22 port (usually), when it is installed on the server machine.

vembutech

Posted 2011-02-18T15:58:40.647

Reputation: 5 693