ssh-ing to port 80.

i am using redhat 8.0 and trying to connect to my local port 80 to run some HTTP. i know this can easily be done with telnet localhost 80, however telnet is not running, ssh is. ssh localhost -p 80 gives me a "Connection refused" error.

i've been trying to find out more information on the web, but the majority of topics are about tunneling; nearly everytime i see topics about telneting to 80, the response is "use ssh," but there are no examples of how. am i using the correct command/syntax? is there a configuration problem elsewhere?

thank you.

effigy,

You will not be able to ssh to a http port and retrieve content. Where as telnet will allow you to send/recieve commands w/o a fixed authentication method, the ssh client will always attempt to connect to a sshd daemon. It really sounds like you have a crippled telnet client - might even just be a shell script. Type "which telnet" and then for whatever location it shows, type "file <path_to_telnet>/telnet" and see if it is a shell script.

Cheers,

Keith

Telnet doesn't really have to "be running", the way you mean. To test whether a machine is running a service on a port, you can generically 'telnet host port'. The whole "use ssh" thing really means "if you're logging into you machine remotely, use ssh, because it's encrypted, telnet isn't, so you're potential passing a plain-text password over the 'net." which doesn't pertain here. For your purposes, 'telnet localhost 80' will do just fine. You'll want to use ssh when you're actually logging into the machine remotely.

thanks everyone. here is the information:

which telnet
/usr/bin/telnet
file /usr/bin/telnet
/usr/bin/telnet: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
telnet 127.0.0.1 80
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

however, telnet works if i use my box's assigned static ip. i assume this is because i haven't told apache to listen to 127.0.0.1 (or does it always?).