LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-29-2002, 04:55 PM   #1
SchwipSchwap
Member
 
Registered: Aug 2002
Distribution: Suse8.0, Mandrake, Knoppix
Posts: 92

Rep: Reputation: 15
Angry telnet localhost problem


i have a problem with telnet when i try to connect to
localhost it says:

telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

access from localhost declined.
Go away.
Connection closed by foreign host.



ssh works fine:

ssh 127.0.0.1
ruebenzahn@127.0.0.1's password:

netstat -an types:

tcp 0 0 127.0.0.1:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN


Can somebody help me what could be wrong
 
Old 08-29-2002, 06:04 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
It looks it's telnet configuration that does not allow you to log in. You may run telnetd with -D switch to enter debug mode and see what's wrong.
 
Old 08-29-2002, 06:24 PM   #3
SchwipSchwap
Member
 
Registered: Aug 2002
Distribution: Suse8.0, Mandrake, Knoppix
Posts: 92

Original Poster
Rep: Reputation: 15
cant find telnetd
 
Old 08-29-2002, 06:53 PM   #4
SchwipSchwap
Member
 
Registered: Aug 2002
Distribution: Suse8.0, Mandrake, Knoppix
Posts: 92

Original Poster
Rep: Reputation: 15
in services telnet is listed with port 23, ssh with 22

that the problem

(only found in.telnetd)
 
Old 08-29-2002, 07:06 PM   #5
lopezjo49
Member
 
Registered: Jun 2002
Location: NJ
Distribution: Mainly Kubuntu 8.10
Posts: 44

Rep: Reputation: 15
in.telnetd is the server. If you're running xinetd, look in /etc/xinetd.d/telnet and make sure disabled is set to no and you can put the -D option at the end of the server string, after the in.telnetd

then run /etc/init.d/xinetd reload
if you look in your /var/log/messages file you should notice telent starting

Hope that helps
 
Old 08-29-2002, 07:59 PM   #6
SchwipSchwap
Member
 
Registered: Aug 2002
Distribution: Suse8.0, Mandrake, Knoppix
Posts: 92

Original Poster
Rep: Reputation: 15
in messages are 2 errors:

Aug 30 02:45:01 linux xinetd[1080]: bind failed (Permission denied (errno = 13)). service = telnet
Aug 30 02:45:01 linux xinetd[1080]: {init_services} no services. Exiting...

Aug 30 02:47:40 linux xinetd[1174]: twist localhost to /bin/echo -e "\n\raccess from localhost declined.\n\rGo away.";sleep 2

whats that twist
where can i find it
need chmod for telnet

Last edited by SchwipSchwap; 08-29-2002 at 08:02 PM.
 
Old 08-29-2002, 08:04 PM   #7
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,694

Rep: Reputation: 45
as root: rcinetd start
 
Old 08-29-2002, 08:36 PM   #8
SchwipSchwap
Member
 
Registered: Aug 2002
Distribution: Suse8.0, Mandrake, Knoppix
Posts: 92

Original Poster
Rep: Reputation: 15
if i uncommend these in hosts.allow:

# in.telnetd : ALL EXCEPT LOCAL : ALLOW
# in.telnetd : ALL : \
# twist /bin/echo -e "\n\raccess from %h declined.\n\rGo away.";sleep 2

i can connect to localhost, but if i want any ports he says:

telnet 127.0.0.1 1234
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

i have no firewalls or iptables
 
Old 08-30-2002, 02:22 AM   #9
dwd
Member
 
Registered: Aug 2002
Distribution: RedHat / Debian / Ubuntu
Posts: 35

Rep: Reputation: 15
Well, yes, you're trying to connect to port 1234, which isn't being listened to by anything. So it's hardly surprising that a connection is refused then.

As for your previous error, that was, of course, generated purely by configuration. But you knew that, apparently.

Telnet operates on port 23 by default, so xinetd only listens on port 23 for it, by default. If you want to run a telnet server on a different port, you'll need to setup service and xinetd entries for it.

It's the port you try to connect to which tells the computer you're talking to which service you're trying to use, and allows a simple TCP connection to be treated as a telnet connection by that computer.

Equally, doing "telnet localhost 22" will not manage telnet, but it will, in this case, connect to your SSH daemon, since you're connecting to that port. Of course, this is not useful unless you happen to be able to do cryptographic mathematics in your head. (Which comes naturally with practise, of course.)

I think you ought to hunt about on the web for a basic primer to networking. Rusty's Remarkably Unreliable Guides has a good basic one, in amongst his documentation of iptables (which he wrote much of):

http://www.netfilter.org/unreliable-guides/

You want the Networking Concepts HOWTO. If anyone hasn't read this, it's worth reading once, no matter how advanced you thought you were before reading.

All of Rusty's documentation is exceptionally good, especially given that not only is he a coder, but he also has an insane hamster forcing him into it. I'm very grateful to the hamster. And to Rusty. :-)
 
Old 03-15-2011, 12:28 AM   #10
ktmariappan
LQ Newbie
 
Registered: Mar 2011
Posts: 6

Rep: Reputation: 1
Thumbs up Telnet not working, but ssh is working

Please do the follow steps

1) Check your hostname which is FQDN or edit /etc/nsswitch.conf
2) Check the /etc/hosts
3) Check /etc/sysconfig/netowrk


Thanks,
Thangamariappan
 
Old 03-15-2011, 01:21 AM   #11
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Actually, dwd is correct and there's nothing wrong with your system; you simply don't have enough knowledge yet.
You need to do some reading; you may find this useful see sections 42.2.1 & 42.5 here http://www.linuxtopia.org/online_boo...ion/index.html for specific detail for your apparent issue. In general that's a very good doc and a great deal of it (the overall explanations and the CLI stuff) will be relevant regardless of distro.


Argh!: Just noticed age of thr
This should prob be closed

Last edited by chrism01; 03-15-2011 at 08:21 PM. Reason: Just noticed age of thr :(
 
  


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
Telnet problem and localhost zillah Linux - Wireless Networking 6 06-07-2005 02:34 PM
can not telnet localhost 25 but telnet dowell.exper.dynserv.com 25 exper Linux - Software 0 02-25-2004 05:13 AM
problem with "telnet localhost 110" nshoboul Linux - Newbie 1 12-04-2003 09:08 AM
Telnet localhost and telnet not from localhost for IMAP services seb77 Linux - Networking 1 10-15-2003 01:20 PM
Samba problem - "telnet localhost 139" hangs whitefor Linux - Networking 1 09-23-2003 11:37 AM


All times are GMT -5. The time now is 01:51 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