Forum Moderators: mack

Message Too Old, No Replies

Simple Telnet Question

Connection Refused...

         

madcat

11:47 am on Mar 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi:

I setup a MySQL/PHP and Apache package on my computer. I want to use Putty to connect into my site but I can't figure out how to do it. If I were using another server, I'd simply put the domain name to connect...but what do you do on a local host? My connection is refused when using localhost, or 127.0.0.1 > These might be way off anyway.

Any help is appreciated!

Dreamquick

12:02 pm on Mar 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're running it on your local machine connecting to 127.0.0.1 port 80 should do the trick (assuming you wanted to connect to the www service rather than another similar service).

- Tony

madcat

2:17 pm on Mar 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, nothing I do will work though. When I try telnet localhost 80, it looks like it connects but nothing happens...just a blank screen. When I hit any key an <html> page comes up saying bad, error request > connection lost...

I'm using Windows 2000.

Thanks...

grahamstewart

2:31 pm on Mar 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep, that is you connected to the web server.
If you want to get a page then type the following:

GET /index.html HTTP/1.0

followed by two returns.

You could also use something like the HTTP viewer available here - http://www.rexswain.com/httpview.html but I doubt that will work for a localhost.

madcat

3:29 pm on Mar 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When I put in that command in Putty my connection is lost. I also lose my connection in the Microsoft Telnet, but I can't even type GET /index.html....The right page seems to pop up with an error (strange), but then disconnects.

Thanks for you help on this.

grahamstewart

3:40 pm on Mar 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You won't be able to see what you are typing so you have to enter it carefully. The connection will be closed after the web server has responded - this is normal.

madcat

4:28 pm on Mar 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know this is simple! It prints out the page I specify...index.html. But it says, "Connection to host lost". It then spits out a normal old C:\> prompt. I'm asking if this is correct because the C:\> won't allow me to do any normal commands...except exit.

grahamstewart

8:54 am on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the C:\> won't allow me to do any normal commands..

Aaaahh... hang on.. now I understand.

You want to be able to telnet in to use commands like

chmod
,
ls
,
cd
etc?
Is that what you mean?

Well the short answer is.. you can't.
Those are Unix commands that you use when telnet'ing into a machine that is running Unix. But your machine is Windows 2000, not Unix.

(The long answer is that you could buy a set of programs that allow you to use unix-like commands on windows boxes and then you could set up a telnet daemon to handle the incoming telnet - but to be honest it is hassle you don't need).

Why would you want to use telnet anyway? If all the files are local then can't you do everything you need to do via Windows?