LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Unable to telnet to Linux Host inspite of installing telnet-server RPM - Need Help (http://www.linuxquestions.org/questions/linux-software-2/unable-to-telnet-to-linux-host-inspite-of-installing-telnet-server-rpm-need-help-519668/)

sinamdar 01-15-2007 10:44 PM

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

jantman 01-15-2007 11:13 PM

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.

sinamdar 01-15-2007 11:30 PM

# 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

chort 01-15-2007 11:37 PM

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.

sinamdar 01-15-2007 11:41 PM

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

jantman 01-15-2007 11:48 PM

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"

ajaz_javeed 01-16-2007 01:31 AM

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.

vikas027 04-11-2009 07:09 AM

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


All times are GMT -5. The time now is 10:01 AM.