Results 1 to 5 of 5
Hello,
I have been searching the past two days on how to solve my "connection refused" message that I am receiving in the linux terminal when using command "telnet machine.domain.com"
...
- 07-25-2011 #1Just Joined!
- Join Date
- Jul 2011
- Posts
- 2
Telnet - Connection Refused in Linux, works in Windows PuTTY
Hello,
I have been searching the past two days on how to solve my "connection refused" message that I am receiving in the linux terminal when using command "telnet machine.domain.com"
The majority of solutions say telnet is disabled on the server, but this cannot be as I can successfully telnet in using PuTTY on a windows laptop.
What's going wrong in CentOS (v6)? Any suggestions would be greatly appreciated!
Matt.
- 07-25-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
The telnet server package is either not installed on your CentOS box or it is not enabled.
# install it
# enable itCode:yum install telnet-server
# start it (via xinetd package)Code:chkconfig telnet on
Note, everybody is right, you should not be running telnet for security reasons (passwords passed in plain text). Use SSH instead. You can use it via Windows / Linux just fine.Code:service xinetd start
It works on your Windows box b/c you have the Telnet service enable and running (which you shouldn't).
- 07-25-2011 #3
Just a hunch:
You are aware, that putty uses ssh by default and not telnet?
So I guess, you connected to the sshd daemon of that centos box.You must always face the curtain with a bow.
- 07-25-2011 #4Just Joined!
- Join Date
- Jul 2011
- Posts
- 2
Thank you for the suggestions.
I tried atreyu's commands to no avail. They were successfully called, but "connection refused" still occurs when attempting to telnet.
In PuTTY I definitely selected telnet, ssh does not work with this box.
I understand the risks associated with telnet, unfortunately it is not up to me though, this is at my place of employment so I have no control over which to use. I've been shown how to successfully connect with putty, I then installed telnet on my linux box but it refuses to connect. Since telnet has been confirmed to work with putty on windows, I'm assuming the problem lies with my linux setup.
- 07-25-2011 #5Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Is the firewall running on the Linux machine? Disable it temporarily, to test:
Use a regular user (not root) to telnet in (root cannot telnet in by default). Add one if need be:Code:service iptables stop
Try telnet from localhost first (the machine the telnet server is running on):Code:useradd -g users testuser echo testpass|passwd --stdin testuser
Also make sure TCP wrappers is not getting in the way. Do this to check the possibly offending config file:Code:telnet -l testuser localhost
Check /var/log/messages and /var/log/secure on the Linux server for errors messages.Code:cat /etc/hosts.deny


Reply With Quote