LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-03-2009, 04:58 PM   #1
htamayo
Member
 
Registered: Jan 2005
Location: san salvador, el salvador
Distribution: Debian Stable, UbuntuStudio Karmic Koala
Posts: 190

Rep: Reputation: 30
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
 
Old 04-03-2009, 05:08 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.

Last edited by acid_kewpie; 04-03-2009 at 05:10 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telnet works with IPv4 but not with IPv6 Hofe68 Linux - Networking 4 01-17-2008 03:14 AM
telnet works but 'telnet host 25' gives 'no route to host' karlmdv Linux - Networking 2 07-25-2006 06:28 AM
wget works but telnet [host] 80 does not connect ttonteri Linux - Networking 6 12-28-2004 09:57 AM
vnc..telnet..rlogin..nothing works 4 me funkymunky Linux - Networking 25 08-20-2004 08:08 AM
ping works, telnet refused ellisdodge Linux - Networking 7 07-01-2002 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration