LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-29-2017, 04:50 AM   #1
Abhishekdubey
LQ Newbie
 
Registered: Feb 2017
Posts: 3

Rep: Reputation: Disabled
Telnet not giving response


telnet is not working Giving error.
Attached Thumbnails
Click image for larger version

Name:	telnet error.jpg
Views:	90
Size:	135.3 KB
ID:	24632  
 
Old 03-29-2017, 04:57 AM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
It is probably being blocked by iptables or nothing is listening on port 80.

Do you have anything set-up/running on port 80, like apache or nginx?

Also if you are gunna screen capture things from windows, at least use the snipping tool rather than giving a screenshot of the entire desktop.
 
Old 03-29-2017, 10:00 AM   #3
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by r3sistance View Post
It is probably being blocked by iptables or nothing is listening on port 80.

...
Wouldn't telnet normally be using port 23 ? So for example:

telnet 127.0.0.1 23
 
Old 03-29-2017, 10:24 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
It was common to use the telnet client to check TCP connections to a server that isn't telnet. As stated it does not appear that anything is currently running on port 80 which is typically a web server. Since the OP has logged into the server the default firewall settings should not be a factor unless they were modified.

From your other post it appears you are running CentOS. Is apache or other web server installed? Try:

service httpd start
 
Old 03-29-2017, 11:08 AM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,137

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
If you are running CentOS, then you need to make sure that telnet is installed (it's not a default) and configured, and then open the firewall for it.

Searching for "centos enable telnet" got me a lot of sites, of which this looks helpful
http://www.computernetworkingnotes.c...-in-linux.html
 
Old 03-29-2017, 11:30 AM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
With openSUSE, several changes from defaults are required to get the telnet server to respond:
1-systemctl enable xinetd
2-pam-config --add --unix-nullok
3-chkconfig telnet on
4-comment or remove in /etc/pam.d/remote the auth line that includes ignore=ignore

With other distros it may be enough to enable xinetd.
 
Old 03-29-2017, 11:30 AM   #7
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
ANYONE:
------------

I just noticed that this is being run remotely while logged into the linux machine over an ssh session from a Windows machine (using PuTTY). Could it be that sshd_config on the remote linux machine is not set up to accept telnet over ssh ?
 
Old 03-29-2017, 11:37 AM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Code:
vi /etc/hosts
says enough.
 
Old 03-29-2017, 11:49 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Nope, ssh is not a factor.

The OP is not trying to connect to a telnet server

Last edited by michaelk; 03-29-2017 at 11:50 AM.
 
1 members found this post helpful.
Old 03-29-2017, 12:32 PM   #10
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,597

Rep: Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690Reputation: 2690
Quote:
Originally Posted by michaelk View Post
Nope, ssh is not a factor.

The OP is not trying to connect to a telnet server
All of those referring to a telnetd server or steps to start one, or the PORT it would use: these things have NOTHING to do with the question.

On the server, the user is using telnet NOT to get a session, but to test port 80 listening on localhost
(the loopback port) and the connection is refused. The telnet is working fine, but reporting that nothign is listening on port 80 or that the connection is blocked so it APPEARS nothing is listening on port 80.

OP: please try this command
Code:
netstat -an|grep LIST|grep -v ING
and examine the output for some line or lines that include
Quote:
:80
and yes you could grep for it but this also tells you what else is or is not listening and that may be useful.

If there is nothing listening on port 80, there you go. You need a service (the httpd examples and comments above pertain) listeing on port 80 or that telnet command will always return that result.

I hope that is somewhat more clear. Please let us know what you discover, and how else we can help.
 
  


Reply



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
Snmpwalk command not giving response in arm based controller porting biyabani Linux - Newbie 0 06-13-2013 04:45 PM
IP-Config: no response after 60 secs - giving up mahmoodn Linux - Server 2 04-19-2011 12:45 AM
DNS fail: can't resolve subdomains, server giving wrong response sneakyimp Linux - Server 4 07-14-2010 12:24 PM
Slackaware 12.2 is giving high response time for applications troj3n Slackware 6 02-10-2010 07:12 AM
telnet response teaddict Linux - Networking 1 07-26-2004 02:10 AM

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

All times are GMT -5. The time now is 02:45 PM.

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