LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   why telnet works instead of ssh (https://www.linuxquestions.org/questions/linux-networking-3/why-telnet-works-instead-of-ssh-716672/)

htamayo 04-03-2009 04:58 PM

why telnet works instead of ssh
 
Hi, I'm trying to remote access to a pc in particular, I have running a web server in 8080 port. This pc has Windows XP running.
Now from my Linux Debian Lenny, i tried this command:
Code:

ssh 10.10.1.18 8080
ssh: connect to host 10.10.1.18 port 22: Connection refused

Now, If I do:
Code:

telnet 10.10.1.18 8080
Trying 10.10.1.18...
Connected to 10.10.1.18.
Escape character is '^]'.

In windows the firewall is disabled.
In my linux I did:nmap -p 22 localhost and I got:
Code:

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-03 15:36 CST
Interesting ports on localhost (127.0.0.1):
PORT  STATE SERVICE
22/tcp open  ssh

Also I did a nmap in my target computer I got that the port 22 is closed. Now doing a netstat -an in windows, i couldn't find the port 22 and the port 23 as if they are listening or something else.

I can see that telnet works instead of ssh. My questions are:

1. ssh didn't work because windows doesn't understand this protocol?

2. do I have to configure something in my linux or windows to establish connection via ssh?

3. do I have to open the port 22 in windows?

Regards

acid_kewpie 04-03-2009 05:08 PM

1. no, ssh didn't work because you're not running an ssh server

2. no, it will never work without an ssh server

3. no, you need to run an ssh server

To be honest, I think it's fair to say that you don't really seem to understand what you're actually doing here. Telnet as a service is PURE EVIL. Do not use it. However. The telnet client is a useful tool to check if ANY tcp socket is open and responsive. you are NOT using telnet in your test there, you are merely using a very basic TCP based tool for low level diagnostics. Also note that you have invalid syntax on the ssh command. Putting "8080" there on the telnet one means that telnet will connect to port 8080. under ssh, this means that (in theory) once you log in on port 22 you would attempt to run a command called "8080" which obviously is not what you're trying to do.


All times are GMT -5. The time now is 05:27 PM.