Operating System - HP-UX
1820879 Members
3745 Online
109628 Solutions
New Discussion юеВ

telnet: Unable to connect to remote host: Connection refused

 
Rolf Kuhfuss
Advisor

telnet: Unable to connect to remote host: Connection refused

Hello

I'm trying to connect from to via telnet and get the following answer: telnet: Unable to connect to remote host: Connection refused

There is neither a .rhosts nor e hosts.equiv file.

Is there anyone who has an answer to this ?

Thanks
Rolf Kuhfuss

It's better to play a nick-shot then a bad longline !
12 REPLIES 12
Rita C Workman
Honored Contributor

Re: telnet: Unable to connect to remote host: Connection refused

 
Steve Steel
Honored Contributor

Re: telnet: Unable to connect to remote host: Connection refused

Hi


See if inetd is running on both machines.
If not restart it.


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

Re: telnet: Unable to connect to remote host: Connection refused

Do you have a file /var/adm/inetd.sec on server2?

If so, is there a 'telnet deny ' entry that has serv1's name or IP address?

If that is there, then telnet would be denied from server1 to server2.
Sanjay_6
Honored Contributor

Re: telnet: Unable to connect to remote host: Connection refused

Hi Rolf,

Check and see if there is a duplicate ip on the network. If you are trying to connect using the server name try using the server ip address.

Hope this helps.

Regds
Roger Baptiste
Honored Contributor

Re: telnet: Unable to connect to remote host: Connection refused

Hi,

Check /var/adm/inetd.sec file on server2 and
see whether there are any 'deny' entries for server1.

Check the /var/adm/syslog/syslog.log file on server2 to see the messages related to server1 telnet entries
eg: grep server1 /var/adm/syslog/syslog.log

(this will definitely give a pointer to where the problem is ).

Other probable reasons could be, lack of pty entries, reaching session limit etc.
This can be confirmed by logging of few existing sessions on server2 and then trying telnet from server1. Try doing rlogin too, to make sure about this.

HTH
raj
Take it easy.
harry d brown jr
Honored Contributor

Re: telnet: Unable to connect to remote host: Connection refused

Rolf,

Can server1 ping server2?

Have you tried from server1, telneting to server2 using server2's IP?

Can you telnet from server2 to server1?

live free or die
harry
Live Free or Die
Rolf Kuhfuss
Advisor

Re: telnet: Unable to connect to remote host: Connection refused

Hello you all

I've tried any proposals you have made, but none of them helped...

a few futher info's: I'm able to ping other servers in the network or start telnet-sessions, DNS is also working (no errors) on both, is not behind a firewall...

strange, isn't it
regards
rolf
It's better to play a nick-shot then a bad longline !
Victor BERRIDGE
Honored Contributor

Re: telnet: Unable to connect to remote host: Connection refused

Hi,
It might sound silly but what type of servers are you trying to telnet?
Because to get to such result IMHO its either a unix or VMS server in a (very) bad state (just before a crash?) or an NT:
VMS case (Its live.. happening now...)
ping geos2
PING geos2.ceti.etat-ge.ch: 64 byte packets
64 bytes from 160.53.40.45: icmp_seq=0. time=2. ms
64 bytes from 160.53.40.45: icmp_seq=1. time=1. ms
64 bytes from 160.53.40.45: icmp_seq=2. time=1. ms
64 bytes from 160.53.40.45: icmp_seq=3. time=1. ms
64 bytes from 160.53.40.45: icmp_seq=4. time=1. ms
64 bytes from 160.53.40.45: icmp_seq=5. time=1. ms

----geos2.ceti.etat-ge.ch PING Statistics----
6 packets transmitted, 6 packets received, 0% packet loss
round-trip (ms) min/avg/max = 1/1/2
octant:/export/f $ telnet geos2
Trying...
Connected to geos2.ceti.etat-ge.ch.
Escape character is '^]'.
Local flow control off
Connection closed by foreign host.

NT - Very close to what you describe:
$ ping bouclier
PING bouclier.ceti.etat-ge.ch: 64 byte packets
64 bytes from 160.53.122.57: icmp_seq=0. time=0. ms
64 bytes from 160.53.122.57: icmp_seq=1. time=0. ms
64 bytes from 160.53.122.57: icmp_seq=2. time=0. ms

----bouclier.ceti.etat-ge.ch PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
$ nslookup bouclier
Using /etc/hosts on: klein

looking up FILES
Trying DNS
Name: bouclier.ceti.etat-ge.ch
Address: 160.53.122.57

$ telnet bouclier
Trying...
telnet: Unable to connect to remote host: Connection refused


All the best

Victor
Steve Steel
Honored Contributor

Re: telnet: Unable to connect to remote host: Connection refused

Hi

can server 2 telnet to itself

can server 1 telnet to itself


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

Re: telnet: Unable to connect to remote host: Connection refused

And are both boxes on the same network?
Roger Baptiste
Honored Contributor

Re: telnet: Unable to connect to remote host: Connection refused

hi,

Did you see any messages related to the telnet session on the syslog file of server2?
Make sure the inetd is running in the log mode
(inetd -l will do it) and then monitor the syslog.log file, even as you login to the system from server1.

HTH
raj
Take it easy.
Steven Sim Kok Leong
Honored Contributor

Re: telnet: Unable to connect to remote host: Connection refused

Hi,

Since from the source system, you are able to ping that server and you are also able to telnet to other servers,
1) telnet is specified correctly in /etc/services
2) there is a network route to that server

I would suspect that it is likely one of the following causes:
1) inetd service not running on that server. Check using:

# ps -fae|grep inetd

2) inetd service was not forced to re-read the configuration file after uncommenting telnet. Re-read configuration using:

# inetd -c

3) /var/adm/inetd.sec is restricting telnet accesses. Check using:

# grep telnet /var/adm/inetd.sec

4) tcpd (tcpwrapper) is used to restrict telnet accesses. Check using:

# grep tcpd /etc/inetd.conf

5) running out of any of nstrtel, nstrpty, npty kernel resources on the destination server. Check after failed attempt using:

# tail /var/adm/syslog/syslog.log

Hope this helps. Regards.

Steven Sim Kok Leong