LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Connection closed by foreign host (https://www.linuxquestions.org/questions/linux-newbie-8/connection-closed-by-foreign-host-4175605633/)

shubha_nand 05-10-2017 07:28 AM

Connection closed by foreign host
 
Hi All,

Iam trying to telnet an database server from Linux machine, it shows connected after few seconds a message is displayed "connection closed by foreign host". Iam connecting through root user.

Could you please is telnet connecting to the database server? what does this message mean? and how to resolve it?
------------

telnet ORA.XXX.COM 1526
trying <IP Address>
connected to ORA.XXX.COM.
escape Character is ']'
Connection closed by foreign host


Thanks,
shubha

pan64 05-10-2017 07:32 AM

most probably the server waits for something.
Telnet connected to that given host/port successfully, but did not send any information over the line. That's why the foreign host closed the connection.

shubha_nand 05-10-2017 07:37 AM

Thank you for the information.
So, can we ignore this message? Or can we resolve if it is a issue?
Basically, if telnet is working fine then we need to write a script to telnet other servers and ports, so please let us know if we can go ahead even with this connection closed by foreign host message?

Thanks.

TB0ne 05-10-2017 07:37 AM

Quote:

Originally Posted by shubha_nand (Post 5708621)
Hi All,

Iam trying to telnet an database server from Linux machine, it shows connected after few seconds a message is displayed "connection closed by foreign host". Iam connecting through root user.

Could you please is telnet connecting to the database server? what does this message mean? and how to resolve it?
------------

telnet ORA.XXX.COM 1526
trying <IP Address>
connected to ORA.XXX.COM.
escape Character is ']'
Connection closed by foreign host

And aside from what pan64 said...you are connecting to a server over a network, as ROOT...over TELNET???? That is possibly the most insecure thing I've heard about in many years. Telnet should NEVER be used, and logging in as root anywhere except the console should never be done. There is simply no reason for either...SSH should be used, and logging in as your 'regular' user should be fine.

And if you're using telnet just to TEST connectivity to a DB listener, it's not going to give you much more than a "yes you connected" type message like you got.

pan64 05-10-2017 07:42 AM

Quote:

Originally Posted by shubha_nand (Post 5708624)
Thank you for the information.
So, can we ignore this message? Or can we resolve if it is a issue?
Basically, if telnet is working fine then we need to write a script to telnet other servers and ports, so please let us know if we can go ahead even with this connection closed by foreign host message?

Thanks.

I have no idea what do you want to achieve at all, so I cannot tell you what can you ignore or you how can go further.
As it was already stated using root account and telnet are not really suggested.

shubha_nand 05-10-2017 07:43 AM

I tried with user account as well, I get the same message after few seconds.

Thanks.

pan64 05-10-2017 07:45 AM

yes, obviously it does not depend on that user id.

michaelk 05-10-2017 07:52 AM

You can not connect to the database server using telnet. telnet uses ASCII and as far as I know Oracle uses a binary protocol. All you can tell from telnet is that some service is running on port 1526.

What are you actually trying to accomplish?


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