cancel
Showing results for 
Search instead for 
Did you mean: 

telnet is not working

SOLVED
Go to solution
akkosh
Advisor

telnet is not working

Hi,
I have a server HP-UX B.11.11
I'm trying to test some applications so that i need to telnet my server ip through a certain Port number 5042

The problem is when i try to ping it gives me error and "closed by foreign host" message.
I check the port and i found it is "listen" and it has an "Established" connection with an external Server.

What could be the reason regarding that issue.
7 REPLIES
Shoghi Martinez G.
Honored Contributor
Solution

Re: telnet is not working

"closed by foreign host" means that it has been conection but the server closed it, this erros comes inmediatly or after a while,

A classic view of a good conection is:
telnet host 5042
Trying...
Connected to localhost.
Escape character is '^]'

The system may close the conection after that, but the initial conection was done.

If the conection fails you may see a message similar like this:
telnet host 4432
Connecting To host...Could not open connection to the host, on port 4432: Connect failed.

HTH
Shoghi.
akkosh
Advisor

Re: telnet is not working

thanks for the answer
but actually the situation is that
I can telnet the server normally
but it fails when i try this port

so i think the port is closed , is that correct , and is there a way to open it
Jorge Pinto Leite
Respected Contributor

Re: telnet is not working

Port 5042 is a registered port. Can the server be using it for any other application and not telnet? Can't you try a dynamic/private port (49152 - 65535)?
Jorge Pinto Leite
Respected Contributor

Re: telnet is not working

Sorry, I haven't read correctly your previous answer.

You can change telnet daemon default port in HP-UX by changing it's conf file (if you're using inetd, the default conf file is /etc/inetd.conf).
akkosh
Advisor

Re: telnet is not working

thanks for the answer i'll try modifying that file.
Steven Schweda
Honored Contributor

Re: telnet is not working

> I'm trying to test some applications [...]

_Which_ applications? Test _how_?

> [...] so that i need to telnet my server
> ip through a certain Port number 5042

Why, exactly?

Does one of these "some applications"
normally listen on that port?

> [...] i'll try modifying that file.

Are you trying to talk to a Telnet server or
to "some applications" (which are listening
on port 5042)? Modifying the configuration
of the normal Telnet server may be a very bad
idea.

> but it fails when i try this port

Actual command? Actual error message?

> so i think the port is closed , is that
> correct , and is there a way to open it

You might be better off not thinking about a
port as being open or closed. Either some
program is listening to that port or not.
The error messages you get when you try to
talk to it might say something, but my
psychic powers are too weak to tell me
anything without your help.
akkosh
Advisor

Re: telnet is not working

thanks all for the support.

The problem was solved.

I think i didnt understand the situation very well.

I had to modify the program to connect to the server through that port , as i found the port listening so that it means it was not closed ...

Anyway , i think i recognized the problem because of your help ... thanks everyone