Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.