TELNENT TO LOCALHOST IN CentOS 7

Home » CentOS » TELNENT TO LOCALHOST IN CentOS 7
CentOS 17 Comments

I just install CentOS 7 on my laptop. I have also installed telnet-server and telnet. I can telnet to other server from my local CentOS 7 but can not telnet localhost also, i can not telnet to my localhost from other server.

I try to check telnet file in /etc/xinetd.d directory but the file “telnet”
is not there.

Please can someone help me with the steps to install telnet or enable telnet services on CentOS 7 so that i can telnet my localhost.

Below is the error message:
[claire@ittestsrvr ~]$ telnet localhost Trying ::1… telnet: connect to address ::1: Connection refused Trying 127.0.0.1… telnet: connect to address 127.0.0.1: Connection refused

17 thoughts on - TELNENT TO LOCALHOST IN CentOS 7

  • I will not go over the question about running telnet in your laptop; others will chime in. Now that is out, did you check whether telnet is running using ps and netstat?

  • Also, how did you turn telnet on? Leave xinetd alone.

    What does

    systemctl status telnet.socket

    tell you?

  • Because telnet is 1970s tech that should die in a fire; it’s not enabled by default nor does the firewall permit it by default.

    Why are you wanting to use telnet in the first place?

    John

  • Which do you think is more likely? Someone sniffing a cleartext credential set on the wire or someone subverting an alleged “secure”
    encrypted protocol?

    Nothing is bullet-proof, we all know this, but you at least make an attempt not to run cleartext crap.

    John

  • For things that matter, you should expect both. For things that don’t matter, well they don’t matter.

  • The original poster has not replied, so we do not know his reasoning.

    Exactly. For instance, what if he needs to use some product whose vendor has never heard of SSH (or company died)? What if he is building a test lab for learning how to use wireshark? Until he comes back and lets us know, we are just farting in the wind.

    Personally I expect him to know what he is doing

  • useless advise, since telnet is almost always run from a socket, the telnetd is only running if there’s an active connection.

    to the OP, the *correct* answer is, do not use or touch xinetd, and if you modified anything in xinetd, undo it. heck, uniinstall xinetd, nothing in RHEL7/CentOS7 uses xinetd anymore.

    root# systemctl enable telnet.socket
    root# systemctl start telnet.socket

    the first command enables it so its available when the system is rebooted.

    the 2nd command starts it now.

    now, I will have to concur, the telnet protocol should be banned, and anything using it should be updated to use SSH instead. I haven’t enabled telnetd on any unix/linux host for the last 10+ years.

  • Technically, you can run kerberized (krb5) telnet/telnetd, and it’s not quite as insecure as unkerberized telnet. The telnet protocol supports security measures, but most people just use OpenSSH (which can do a lot more) so there’s little effort being made to widely use it.

    I doubt the OP was setting up krb5 telnetd, though.

  • That only protects the authentication stage. You have to add RFC 2946 encryption or TLS to encrypt the rest of the conversation, something you get for free with SSH. Then having done that, you get to seek out the rare clients that can speak these protocol extensions, whereas all SSH clients do what you want as a matter of course.

    It doesn

  • You’d have to use the clients in krb5-appl-clients and the telnetd in krb5-appl-servers. The ‘telnet’ in krb5-appl-clients has an -x flag that encrypts the data stream.

    I never use any of this anymore. In fact, the only reason why I used kerberized telnet was back before OpenSSH was as widespread, and encrypted telnet was less overhead on the really old Suns I used. I
    just wanted to point out that the ‘telnet’ protocol is more than plain text.


    Jonathan Billings