LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 01-15-2007, 10:44 PM   #1
sinamdar
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
Unable to telnet to Linux Host inspite of installing telnet-server RPM - Need Help


Hi Experts,

Have to enable telnet on the Linux host. Installed telnet-server-0.17-37 RPM on the host.

The /etc/xinetd.d/telnet file has the following :

# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}

But when I try to connect to this host, I get "Connection closed by foreign host" message.

Can you please guide me if I am missing some information or some configuration.

Your guidance is highly appreciated.

Thanks,
SINAMDAR
 
Old 01-15-2007, 11:13 PM   #2
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
What distro are you using?

Is the telnet server running? Make sure that it is setup to start automatically...

Try opening a terminal and telnetting to localhost or 127.0.0.1.
 
Old 01-15-2007, 11:30 PM   #3
sinamdar
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
# uname -a
Linux india-wipro-tb1.cisco.com 2.6.9-1.667smp #1 SMP Tue Nov 2 14:59:52 EST 2004 i686 i686 i386 GNU/Linux
[root@india-wipro-tb1 bodcmanta]#

How can I setup to start telnet automatically ?

As you suggest, I tried telnet to local host, give the same error :

[root@india-wipro-tb1 bodcmanta]# telnet localhost
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host.

Not sure what the problem is !!

The /var/log/messages shows the following :

[root@india-wipro-tb1 bodcmanta]# tail -f /var/log/messages
Jan 15 21:03:34 tb1 xinetd[2447]: Swapping defaults
Jan 15 21:03:34 tb1 xinetd[2447]: readjusting service ftp
Jan 15 21:03:34 tb1 xinetd[2447]: service telnet deactivated
Jan 15 21:03:34 tb1 xinetd[2447]: Errors deactivating service telnet
Jan 15 21:03:34 tb1 xinetd[2447]: readjusting service tftp
Jan 15 21:03:34 tb1 xinetd[2447]: readjusting service telnet
Jan 15 21:03:34 tb1 xinetd[2447]: Reconfigured: new=0 old=3 dropped=1 (services)
Jan 15 21:08:09 tb1 sshd(pam_unix)[3907]: session opened for user root by root(uid=0)
Jan 15 21:15:01 tb1 crond(pam_unix)[3942]: session opened for user root by (uid=0)
Jan 15 21:15:01 tb1 crond(pam_unix)[3942]: session closed for user root
 
Old 01-15-2007, 11:37 PM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
A better question to ask would be: Why are you even trying to use telnet in the first place? It's totally insecure and a prefect alternative (ssh) exists and is enabled by default in most Linux distributions.
 
Old 01-15-2007, 11:41 PM   #5
sinamdar
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
We are testing TCP-MIB and have just one switch. So we need to establish a TCP connection btween switch and Linux host for the MIB objects to be populated.

Thats the reason I want to enable telnet on the Linux host momentarily. Later will disable the same. We have SSH running.

Thanks for the inputs.
SINAMDAR
 
Old 01-15-2007, 11:48 PM   #6
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
Those were just the first things that popped into my head... I haven't tried to enable Telnet on a Linux box in a while...

You might do a google search for "linux telnet server howto"
 
Old 01-16-2007, 01:31 AM   #7
ajaz_javeed
LQ Newbie
 
Registered: Jan 2007
Posts: 24

Rep: Reputation: 15
Hi sinamdar,

Please make note that telnet login to root accounts is disabled by default for security reasons. Instead, check the connection by login into a normal user account.
 
Old 04-11-2009, 07:09 AM   #8
vikas027
Senior Member
 
Registered: May 2007
Distribution: RHEL, CentOS
Posts: 1,241

Rep: Reputation: 96
I also got stuck for a while and googled the solution. May be helpful for someone.



comment this line auth required pam_securetty.so
in /etc/pam.d/remote
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to turn on telnet and FTP after installing Linux Redhat Advance Server 2.1 ashley75 Linux - General 10 12-12-2013 04:09 AM
telnet works but 'telnet host 25' gives 'no route to host' karlmdv Linux - Networking 2 07-25-2006 06:28 AM
Unable to connect to server using hostname with telnet and browser Schlumpf42 Linux - Networking 6 10-14-2004 11:03 AM
telnet-server-0.17-25.i386.rpm is 'on' ? jack101 Linux - Newbie 2 08-17-2003 04:51 PM
telnet: Unable to connect to remote host: Connection refused batham Linux - Networking 0 07-07-2003 05:29 PM


All times are GMT -5. The time now is 03:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration