Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
05-10-2017, 08:28 AM
|
#1
|
LQ Newbie
Registered: May 2017
Posts: 3
Rep:
|
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
|
|
|
05-10-2017, 08:32 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,453
|
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.
|
|
|
05-10-2017, 08:37 AM
|
#3
|
LQ Newbie
Registered: May 2017
Posts: 3
Original Poster
Rep:
|
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.
|
|
|
05-10-2017, 08:37 AM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,416
|
Quote:
Originally Posted by shubha_nand
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.
|
|
|
05-10-2017, 08:42 AM
|
#5
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,453
|
Quote:
Originally Posted by shubha_nand
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.
|
|
|
05-10-2017, 08:43 AM
|
#6
|
LQ Newbie
Registered: May 2017
Posts: 3
Original Poster
Rep:
|
I tried with user account as well, I get the same message after few seconds.
Thanks.
|
|
|
05-10-2017, 08:45 AM
|
#7
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,453
|
yes, obviously it does not depend on that user id.
|
|
|
05-10-2017, 08:52 AM
|
#8
|
Moderator
Registered: Aug 2002
Posts: 26,459
|
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?
Last edited by michaelk; 05-10-2017 at 09:00 AM.
|
|
|
All times are GMT -5. The time now is 04:37 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|