Operating System - HP-UX
1834978 Members
2344 Online
110073 Solutions
New Discussion

telnet: Unable to connect to remote host: Connection refused

 
yangk
Frequent Advisor

telnet: Unable to connect to remote host: Connection refused

Hi
I have encounted a problem with telnet on the HP-UX11.11.
And the /etc/hosts file as following:
16.157.129.222 sshpa3.chn.hp.com sshpa3
127.0.0.1 localhost loopback

When I use the command:

1.root@sshpa3# telnet sshpa3
Trying...
telnet: Unable to connect to remote host:Connection refused

and when I use the command :
root@sshpa3# telnet localhost
or
root@sshpa3# telnet 127.0.0.1
can login to the system.

so what is the problem?Thanks!
What's more the command "ping sshpa3 " can work well.

And "nslookup sshpa3.chn.hp.com":

looking up FILES
Name: sshpa3.chn.hp.com
Address: 16.157.129.222
Aliases: sshpa3

It can resolve the realm name.
so what is the problem?

Thanks!
9 REPLIES 9
Ganesan R
Honored Contributor

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

Hi,

What is output of #telnet 16.157.129.222 ?

Are you able to telnet using ip address?
Best wishes,

Ganesh.
yangk
Frequent Advisor

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

When I use the command:

root@sshpa3# telnet 16.157.129.222

it can login to the system.
I think "telnet sshpa3 " and "telnet sshpa3.chn.hp.com" just the sshpa3 and sshpa3.chn.hp.com " can not resolve to the IP address 16.157.129.222.

But "nslookup sshpa3.chn.hp.com":

looking up FILES
Name: sshpa3.chn.hp.com
Address: 16.157.129.222
Aliases: sshpa3

Matti_Kurkela
Honored Contributor

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

Some sort of local filtering seems to be in effect.

Does the system have IPFilter installed?
If it has, the configuration is usually stored at /etc/opt/ipf.

Or maybe the system's network interface has been reconfigured without rebooting the system? In that case, running the command "inetd -c" might help.

MK
MK
Steven Schweda
Honored Contributor

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

yangk
Frequent Advisor

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

Hi ,Matti Kurkela


But the ipf config file "ipf.conf and ipnat.conf" is empty.

and I do not modify inetd.conf file.
the telnet is listening on port 23.
tcp 0 0 *.23 *.* LISTEN

and in the inetd.conf file:
telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue



Ganesan R
Honored Contributor

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

Hi,

Do you have /etc/hosts.allow and /etc/hosts.deny files in place ? If you have look into the files.

Just to make sure we have not blocked telnet services in inetd.sec, try connecting from remote machine using hostname and ip address.

Best wishes,

Ganesh.
yangk
Frequent Advisor

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

Hi ,Ganesan R

In the folder /etc/, just have a hosts.equiv
file , but just have only one line :
sshpa4.chn.hp.com root

so I think there is nothing to do with the hosts.equiv file

And also there is no deny in the inetd.sec file.
yangk
Frequent Advisor

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

I have found what is the reason of the problem. Thank you everyone.
Ganesan R
Honored Contributor

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

Hi,

Could you share your findings so that it will be useful for others when they come across the same issue?
Best wishes,

Ganesh.