LinuxQuestions.org
Help answer threads with 0 replies.
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, 05: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:	27
Size:	135.3 KB
ID:	24632  
 
Old 03-29-2017, 05: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, 11:00 AM   #3
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,011

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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, 11:24 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,740

Rep: Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384
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, 12:08 PM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Xubuntu
Posts: 5,114

Rep: Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706
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, 12:30 PM   #6
mrmazda
Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 754

Rep: Reputation: 232Reputation: 232Reputation: 232
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, 12:30 PM   #7
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,011

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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, 12:37 PM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,345
Blog Entries: 36

Rep: Reputation: Disabled
Code:
vi /etc/hosts
says enough.
 
Old 03-29-2017, 12:49 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,740

Rep: Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384Reputation: 2384
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 12:50 PM.
 
1 members found this post helpful.
Old 03-29-2017, 01:32 PM   #10
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,731

Rep: Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130Reputation: 1130
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


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

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

All times are GMT -5. The time now is 01:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration