LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Telnet to Redhat fails (https://www.linuxquestions.org/questions/linux-newbie-8/telnet-to-redhat-fails-297775/)

DDD26 03-04-2005 07:48 PM

Telnet to Redhat fails
 
I am trying to connect from one Windows XP running computer to Redhat workstation. I do the following:

1. Check IP address of the linux machine (e.g. whatismyipaddress.com);
2. Type

telnet "IPaddress" (where IPaddress is the IP address of the linux machine)

on the windows machine and I get an error "connection timed out"

I tried connecting to another computer running IRIX with the same method and it works fine. Could someone help me out?

xowl 03-04-2005 08:14 PM

1) both pcs have an IP

2) is the windows machine in the same subnet
(by subnet I mean something like 192.168.1.1 192.168.1.10)

JimBass 03-04-2005 08:18 PM

There are any number of problems that you may be experiencing, but here are the 2 most likely -

1) If the redhat box is behind a firewall or router, and you go to whatismyipaddress.com, you are not going to get the redhat box's "true" IP address, you are getting the IP of the router or firewall.

2) Telnet is junk. Telnet sends unencrypted passwords accross the net, meaning anyone running a packet sniffer will get your username and password in 1 attempt. Red Hat 9 is ancient by linux standards, but even from when it came out, I believe ssh (similiar to telnet, but it encrypts the data) was the default way to access through the net.

It worked with the irix box probably because that box was running a real world IP, so it can be reached from anywhere. If your redhat box is on your lan, you need to know its LOCAL Ip (192.168.x.x, 172.Y.x.x (Y<=16), 169.254.x.x, or 10.x.x.x), and you can telnet to it that way. Use SSH though, it is infinitely more safe.

You can find the IP address on the redhat box much more effectively by doing ifconfig eth0 as full root (su -), and you will be able to connect to that.

Also, seriously consider upgrading that redhat box if you have control of it, that is so old it has missed 3 major versions. It is like finding somebody still using Windows 95 nowadays.

Peace,
JimBass

DDD25 03-04-2005 10:25 PM

Quote:

Originally posted by xowl
1) both pcs have an IP

2) is the windows machine in the same subnet
(by subnet I mean something like 192.168.1.1 192.168.1.10)

No they have different subnet.

DDD25 03-04-2005 10:26 PM

Quote:

Originally posted by JimBass
There are any number of problems that you may be experiencing, but here are the 2 most likely -

1) If the redhat box is behind a firewall or router, and you go to whatismyipaddress.com, you are not going to get the redhat box's "true" IP address, you are getting the IP of the router or firewall.

2) Telnet is junk. Telnet sends unencrypted passwords accross the net, meaning anyone running a packet sniffer will get your username and password in 1 attempt. Red Hat 9 is ancient by linux standards, but even from when it came out, I believe ssh (similiar to telnet, but it encrypts the data) was the default way to access through the net.

It worked with the irix box probably because that box was running a real world IP, so it can be reached from anywhere. If your redhat box is on your lan, you need to know its LOCAL Ip (192.168.x.x, 172.Y.x.x (Y<=16), 169.254.x.x, or 10.x.x.x), and you can telnet to it that way. Use SSH though, it is infinitely more safe.

You can find the IP address on the redhat box much more effectively by doing ifconfig eth0 as full root (su -), and you will be able to connect to that.

Also, seriously consider upgrading that redhat box if you have control of it, that is so old it has missed 3 major versions. It is like finding somebody still using Windows 95 nowadays.

Peace,
JimBass

THanks. I will try to check that tomorrow.

xowl 03-05-2005 07:37 AM

Ok, if they arent in the same subnet U must configure a router/gateway in both machines, so U can ping each other

DDD25 03-05-2005 03:10 PM

I obtained the IP using the command you wrote and tried connecting to that IP. I couldn't do it.

I have also tried to connect from another computer which is on the same subnet and I got the same error.

Any suggestions?

JimBass 03-05-2005 03:41 PM

Connnect to the IP of the redhat box from your windows box on the same subnet, but NOT telnet, use SSH. Chances are fairly good that the telnet server on the redhat box isn't on, because it is a security risk. Putty is a free app for window$ that can use ssh.

Peace,
JimBass

DDD25 03-05-2005 04:38 PM

I tried using SSH and I got: "The server is unreachable".

JimBass 03-05-2005 05:52 PM

Then on the redhat box, as root, do
Code:

/etc/init.d/sshd start
That should fire up the ssh deamon. If you still can't get in, then you should post the full IP info about the boxes involved, so we can look at problems in that area. If you are on the same LAN as the server, a firewall shouldn't be a problem, but it may be.

Peace,
JimBass


All times are GMT -5. The time now is 12:45 AM.