LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-06-2011, 02:30 AM   #1
aggrishabh
Member
 
Registered: Nov 2010
Posts: 87

Rep: Reputation: 1
Unhappy Telnet help on Centos 5.5


Hi All,

i am on CentOS 5.5 ,and unable to do the Telnet please help. SElinux is in Permissive mode and firewall is off. below are the details for the help. i tried it before and after disabling the firewall and SELinux.

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



[root@Test ~]# telnet localhost
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused

[root@Test ~]# chkconfig --list |grep telnet
ekrb5-telnet: off
krb5-telnet: off
telnet: on

[root@Test ~]# getenforce
Permissive

[root@Test ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 Test.linux Test localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

[root@Test ~]# /etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@Test ~]#



please let me know if anymore information is needed
 
Old 04-06-2011, 04:30 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Try running the following to see if telnet is even running:
Code:
ps aux | grep telnet
 
Old 04-06-2011, 05:08 AM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Do you have any special reason to use telnet rather SSH? SSH more secure than telnet. In default sshd available in centos

Last edited by kirukan; 04-06-2011 at 05:11 AM.
 
Old 04-06-2011, 05:50 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Quote:
Originally Posted by corp769 View Post
Try running the following to see if telnet is even running:
Code:
ps aux | grep telnet
It's not going to work as OP tries to run telnet through xinetd. He could try
Code:
netstat -tanpl|grep 23
I second kirukan that running telnet is not a wise thing to do


@OP
If you want to use telnet for some particular season, disable telnet and enable krb5-telnet in xinetd

Regards
 
1 members found this post helpful.
Old 04-06-2011, 05:58 AM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
It's not going to work as OP tries to run telnet through xinetd.
Good point, it's been a while since I messed with xinetd. Thanks for that.
The OP could do it your way, or run nmap on his local machine to scan for an open port 23.

Edit - And I "third" about not running telnet too. But the OP asked about telnet, I am not going to try to get him/her to directly switch to SSH before the problem is solved.

Last edited by corp769; 04-06-2011 at 05:59 AM.
 
Old 04-06-2011, 09:53 PM   #6
aggrishabh
Member
 
Registered: Nov 2010
Posts: 87

Original Poster
Rep: Reputation: 1
Thanks for replying,
Please see below.

one thing more how to change the default port no(23) to something else higher then 1000.

[root@Test ~]# netstat -tanpl|grep 23
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2333/hpiod
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2386/vsftpd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2360/cupsd
tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2338/python
tcp 0 0 :::22 :::* LISTEN 2351/sshd
 
Old 04-07-2011, 01:43 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Quote:
one thing more how to change the default port no(23) to something else higher then 1000.
Once again, if you are absolutely sure you want to use telnet, then you should change the telnet port in /etc/services and restart xinetd
 
Old 04-07-2011, 01:59 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
There's a good HOWTO here http://www.linuxhomenetworking.com/w...TP,_and_xinetd, but I'm not convinced you need / should edit /etc/services. That's just a list of 'Well Known Ports' http://www.iana.org/assignments/port-numbers.
The 'port' setting in the telnet / xinet cfg file should be sufficient I believe.
Also, if you're on Centos 5.x this is very good also http://www.linuxtopia.org/online_boo...ion/index.html

Last edited by chrism01; 04-07-2011 at 02:01 AM.
 
Old 04-08-2011, 12:49 AM   #9
aggrishabh
Member
 
Registered: Nov 2010
Posts: 87

Original Poster
Rep: Reputation: 1
still in the middle of nowhere

[root@Test ~]# netstat -tnapl|grep 23
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2333/vsftpd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2307/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2351/sendmail: acce

[root@Test ~]# netstat -tnapl|grep telnet
[root@Test ~]#

it seems that the no port is listening to telnet.(how to enable this)?

i have 2 nic card in pc 1) onboard which is no more working and i already disabled it. 2) other one is in pci slot which is working fine and able to login via ssh through putty.

question is why i need telnet
ans. as a requirement to connect to pserver(CVS) telnet is the only way i suppose.

[root@Test ~]# chkconfig --list |grep telnet
ekrb5-telnet: off
krb5-telnet: off
telnet: on
[root@Test ~]#


Thanks for your help.
 
Old 04-08-2011, 01:20 AM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
Telnetd (telnet daemon) itself is controlled by xinetd daemon, therefore xinetd listens on the designated port on behalf of telnetd & activates it when called.
See that Linuxtopia link in my prev post.

From your last post it seems (to me ?) that you're confusing the telnet client (used to connect to remote CVS server) with the telnetd daemon used to listen on your local system for incoming telnet clients.

I would hope a modern CVS server would allow ssh or ssl based cxns.
 
Old 04-10-2011, 11:48 PM   #11
aggrishabh
Member
 
Registered: Nov 2010
Posts: 87

Original Poster
Rep: Reputation: 1
Thanks for the all your response.

Yes that i know, xinetd services manage the telnet and get activated when called.
now question is that why i am not able to telnet this machine from other machine or localhost itself.

From the above configuration(in previous posts) it seems that there is nothing wrong with configuration. isn't it? if that is so please help me out of this.
 
Old 04-11-2011, 01:23 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Quote:
From the above configuration(in previous posts) it seems that there is nothing wrong with configuration. isn't it? if that is so please help me out of this.
If you want to use telnet, disable telnet (use disable=yes in /etc/xinetd.d/telnet) and enable krb5-telnet (use disable=no in /etc/xinetd.d/krb5-telnet). Then restart xinetd.
 
Old 04-11-2011, 07:14 AM   #13
venikathir
LQ Newbie
 
Registered: Apr 2011
Location: Bangalroe-India
Distribution: Redhat EL5
Posts: 24

Rep: Reputation: 1
Hi
rpm telnet-server installed?

[root@rhel5 scripts]# rpm -qa | grep telnet
telnet-0.17-39.el5
telnet-server-0.17-39.el5

if installed configure the telnet /etc/xinet.d/telnet

service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
then u just connect telnet localhost
it will work ....
thnx
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS server not accepting Telnet requests Azzath Linux - Server 10 02-21-2010 09:48 AM
telnet root login possible in FC2/centos 5 i386 takuttamkumar Linux - Security 1 11-18-2008 12:47 PM
Centos not support Telnet and Ftp services? siebel Linux - Newbie 1 01-08-2008 11:29 AM
Telnet Client / CentOS riluve Red Hat 2 10-13-2006 11:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration