Unable to telnet to Linux Host inspite of installing telnet-server RPM - Need Help
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.
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.
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.
# 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
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
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: Swapping defaults
Jan 15 21:03:34 tb1 xinetd: readjusting service ftp
Jan 15 21:03:34 tb1 xinetd: service telnet deactivated
Jan 15 21:03:34 tb1 xinetd: Errors deactivating service telnet
Jan 15 21:03:34 tb1 xinetd: readjusting service tftp
Jan 15 21:03:34 tb1 xinetd: readjusting service telnet
Jan 15 21:03:34 tb1 xinetd: Reconfigured: new=0 old=3 dropped=1 (services)
Jan 15 21:08:09 tb1 sshd(pam_unix): session opened for user root by root(uid=0)
Jan 15 21:15:01 tb1 crond(pam_unix): session opened for user root by (uid=0)
Jan 15 21:15:01 tb1 crond(pam_unix): session closed for user root
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.
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.
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"
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.
I also got stuck for a while and googled the solution. May be helpful for someone.
comment this line auth required pam_securetty.so
|All times are GMT -5. The time now is 06:52 AM.|