Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Telnet - Connection Refused in Linux, works in Windows PuTTY


    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"

    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!


  2. #2
    The telnet server package is either not installed on your CentOS box or it is not enabled.

    # install it
    yum install telnet-server
    # enable it
    chkconfig telnet on
    # start it (via xinetd package)
    service xinetd start
    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.

    It works on your Windows box b/c you have the Telnet service enable and running (which you shouldn't).

  3. #3
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    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.

  4. $spacer_open
  5. #4
    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.

  6. #5
    Is the firewall running on the Linux machine? Disable it temporarily, to test:
    service iptables stop
    Use a regular user (not root) to telnet in (root cannot telnet in by default). Add one if need be:
    useradd -g users testuser
    echo testpass|passwd --stdin testuser
    Try telnet from localhost first (the machine the telnet server is running on):
    telnet -l testuser localhost
    Also make sure TCP wrappers is not getting in the way. Do this to check the possibly offending config file:
    cat /etc/hosts.deny
    Check /var/log/messages and /var/log/secure on the Linux server for errors messages.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts