Operating System - HP-UX
1820143 Members
3160 Online
109620 Solutions
New Discussion юеВ

unable to telnet to server

 
Yvonne Chan
Advisor

unable to telnet to server

I tried to do a "telnet localhost" and able to login but when I do a "telnet servername" it gives me error. Why is this so?
telnet cwsas01
Trying...
Connected to servername.
Escape character is '^]'.
Local flow control off
Connection closed by foreign host.
root@cwsas01:/dev/vg03 # telnet 173.5.7.4
Trying...
Connected to 173.5.7.4.
Escape character is '^]'.
Local flow control off
Connection closed by foreign host.
19 REPLIES 19
Steve Steel
Honored Contributor

Re: unable to telnet to server

Hi


Does /var/adm/syslog/syslog.log show any faults



Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
John Poff
Honored Contributor

Re: unable to telnet to server

Hi,

One thing to check is your name resolution. If you do an 'nslookup' and then type in the name of your server, cwsas01, it should return the IP address of 173.5.7.4. Then, type in that IP address and it should return the name of your server and that IP again. If that isn't working it could break telnet, and you'll need to either get the IP address and hostname right in your /etc/hosts file or in DNS.

JP
Yvonne Chan
Advisor

Re: unable to telnet to server

Steve Steel
No error message on syslog.log

JP
There is entry of the name server and IP address.
Balaji N
Honored Contributor

Re: unable to telnet to server

hi
i had similar problems on a machine. finally it turned out be a problem with a hard disk.

whenever the hdd went to NO_HW state, this problem used to occur. and finally after the hdd was changed this problem got fixed.

are all the io devices fine. and any errors in dmesg.

-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Yvonne Chan
Advisor

Re: unable to telnet to server

there is no error message. My server was crash. And now trying to recover the necessary files.
Bill McNAMARA_1
Honored Contributor

Re: unable to telnet to server

Did you recently install a QPK or Patches?
Does rlogin or remsh work?

This is a bit odd too:
Connected to servername.

so check /etc/hosts on 173.5.7.4.
It works for me (tm)
John Poff
Honored Contributor

Re: unable to telnet to server

Hi again,

What does 'netstat -rn' and 'lanscan' return? Also, are you getting any error messages in your syslog about telnet?

JP
Yvonne Chan
Advisor

Re: unable to telnet to server

netstat -rn
Routing tables
Dest/Netmask Gateway Flags Refs Use Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 11648 lo0 4136
172.17.3.40 172.17.3.40 UH 0 2191 lan0 4136
172.17.3.32 172.17.3.40 U 2 0 lan0 1500
127.0.0.0 127.0.0.1 U 0 0 lo0 4136
default 172.17.3.33 UG 0 0 lan0 1500
root@cwsas01:/storage # lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/0/0 0x0010837C22EC 0 UP lan0 snap0 1 ETHER Yes 119
0/10/0/0 0x001083F7B447 1 UP lan1 snap1 2 ETHER Yes 119
Yvonne Chan
Advisor

Re: unable to telnet to server

But why am I able to use telnet localhost?
Steve Steel
Honored Contributor

Re: unable to telnet to server

Hi

can you rlogin to your own host


steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Michael Duthie
Trusted Contributor

Re: unable to telnet to server

Yvonne,

1st thing I would ask is what has changed ?

Network config ?
Patches added ?

It looks like you are connectin so host resolution looks ok.

try either so these -

1 - check the telnet daemon
Run the following commands to check if there is a mismatch between the telnet daemon and the version of telnet in the kernel:

what /usr/lbin/telnetd


The output should be :
/usr/lbin/telnetd:
Copyright (c) 1983, 1986 Regents of the University of California.
Patch ID: [PHNE_21822/PACHRDME/English]
telnetd.c $Revision: 1.29.214.16 $ $Date: 2000/06/08 23:40:02 $
telnetd.c 5.31 (Berkeley) 2/23/89
authenc.c 8.1 (Berkeley) 6/4/93

what /stand/vmunix | grep str_telnet

The output should be similar to:
str_telnet.c: [PHNE_16546/PACHRDME/English]
str_telnet.c $Revision: 1.2.118.6 $ $Date: 98/11/17 22:39:11 $


If there is a difference, regen the kernel again and reboot.

2 - check the device files.
execute the following line for ptym and ptys pseudo drivers

# insf -d pty -n 400 (Or what ever parameter is set in the kernel for npty & nstrpty)

if this did not fix the problem execute the following commands.

insf -evd tlclts

insf -evd tlcotsod

insf -evd tlcots

insf -d tels

insf -d telm


Ramkumar Devanathan
Honored Contributor

Re: unable to telnet to server

when i try to telnet to one of machines from itself, i
get the following -

>>>>>>>>>>>>>>>>>>>

# telnet abcd
Trying...
Connected to abcd.india.hp.com.
Escape character is '^]'.
Local flow control on
Telnet TERMINAL-SPEED option ON

HP-UX abcd B.11.00 U 9000/785 (th)

login:

<<<<<<<<<<<<<<<<<<<<

Note the line that say's local flow control on - in your case it is off.

I don't know how to change this, but somebody who knows will help you out now.

- ramd.
HPE Software Rocks!
Ramkumar Devanathan
Honored Contributor

Re: unable to telnet to server

Sorry that was a mistake. I am wrong - ignore the previous answer.

- ramd.
HPE Software Rocks!
John Poff
Honored Contributor

Re: unable to telnet to server

Hi again,

It looks like from the output from your netstat command that your system doesn't have the 173.5.7.4 IP address defined. It appears to have two addresses defined on the 172. subnet.

What happens when you try to ping cwsas01 and also ping 173.5.7.4? If I understand you correctly, you are working on a machine named cwsas01, which should have an IP address of 173.5.7.4? Can you post the contents of your /etc/rc.config.d/netconf file?

JP
Yvonne Chan
Advisor

Re: unable to telnet to server

Below is the results.
what /usr/lbin/telnetd
/usr/lbin/telnetd:
Copyright (c) 1983, 1986 Regents of the University of California.
Patch ID: PHNE_21822
telnetd.c $Revision: 1.29.214.16 $ $Date: 2000/06/08 23:40:02 $
telnetd.c 5.31 (Berkeley) 2/23/89
authenc.c 8.1 (Berkeley) 6/4/93

what /stand/vmunix |grep str_telnet
str_telnet.c: PHNE_21822
str_telnet.c $Revision: 1.2.118.6 $ $Date: 2000/06/08 10:12:57 $
Yvonne Chan
Advisor

Re: unable to telnet to server

Hi JP,
Sorry for my error the ip address for cwsas01 should be 172.17.3.40.
Mel Burslan
Honored Contributor

Re: unable to telnet to server

did you happen to chek the integrity of your /var/adm/inetd.sec file and especially the line referencing to the "telnet" service.

getting a response from localhost and not from the server name sounds like your telnet line in inetd.sec file looks something like this

telnet allow loopback

and nothing else. If this is the case, add some allowed server names/addresses or allowed network addresses after loopback and you may resolve your problem.

Just my 2 cents. The things that get you are sometimes the simplest of all.
________________________________
UNIX because I majored in cryptology...
Yvonne Chan
Advisor

Re: unable to telnet to server

I had check my /var/adm/inetd.sec. Initially, I only have telnet allow cwsas01. Then even if I add telnet allow localhost or telnet allow 172.17.3.40. I am still facing the same problem.
allarme rosso
Advisor

Re: unable to telnet to server

Hi,

if you don't use /etc/inetd.sec remove it.

After edit the file /etc/inetd.conf, you must have a line like this:
"telnet stream tcp nowait root /usr/lbin/telnetd telnetd"

rgds tam

tammaro