ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Weird telnet Issue

    IT Discussion
    terminator telnet
    5
    15
    1.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • travisdh1T
      travisdh1 @anthonyh
      last edited by

      First WAG would be DNS resolution problem. Does it act the same way when using ssh?

      anthonyhA 2 Replies Last reply Reply Quote 1
      • anthonyhA
        anthonyh @travisdh1
        last edited by

        @travisdh1 I always use the IP, so DNS should be out of the mix. SSH does not have this issue.

        tonyshowoffT 1 Reply Last reply Reply Quote 2
        • scottalanmillerS
          scottalanmiller
          last edited by

          Definitely a weird one. I can't think of why it would do that. Is it possible that it is somehow related to Reverse DNS lookups, that your workstation is not listed in DNS and the machines into which you are remoting are trying to look it up?

          anthonyhA 1 Reply Last reply Reply Quote 1
          • anthonyhA
            anthonyh @scottalanmiller
            last edited by

            @scottalanmiller said in Weird telnet Issue:

            Definitely a weird one. I can't think of why it would do that. Is it possible that it is somehow related to Reverse DNS lookups, that your workstation is not listed in DNS and the machines into which you are remoting are trying to look it up?

            That would make sense, except when I SSH into my box from another box, then start a telnet session without any delay. That's where I'm confused!

            1 Reply Last reply Reply Quote 0
            • anthonyhA
              anthonyh
              last edited by

              You want to know what's even weirder?! If I SSH into my box, while I'm ON that box (ssh 127.0.0.1), I can start a telnet session without any sort of delay.

              What...the...heck???

              1 Reply Last reply Reply Quote 2
              • T
                tiagom
                last edited by

                Super strange.. Some super weird routing issue?

                Capture it with and without a delay and see for any differences?

                1 Reply Last reply Reply Quote 0
                • tonyshowoffT
                  tonyshowoff @anthonyh
                  last edited by

                  @anthonyh said in Weird telnet Issue:

                  @travisdh1 I always use the IP, so DNS should be out of the mix. SSH does not have this issue.

                  It doesn't matter if you go by IP, the daemon will still try to resolve your IP to host. I'd check to see if there's a configuration issue, seeing how DNS look ups can be turned off for sshd, I imagine that's true with telnetd as well, and that may be why you're having the problem with telnet, but not ssh. As far as machines go, depending on subnets and further configuration, as well as DNS server response/cache time (many people forget to add forwarders and only use the root ones, making it all slow), this could also make the issue only happen with certain machines, but not with others.

                  1 Reply Last reply Reply Quote 1
                  • scottalanmillerS
                    scottalanmiller
                    last edited by

                    Maybe it is a bit of coincidence and really there is a DNS round robin involved.

                    1 Reply Last reply Reply Quote 1
                    • anthonyhA
                      anthonyh
                      last edited by

                      Here is where I'm boggled that I think some are missing...

                      If I am using telnet directly on my workstation, I get a 10 or so second delay before the session starts.

                      If I SSH into my workstation, then use telnet, the session starts instantly.

                      If I SSH into my workstation, from my workstation (e.g. ssh 127.0.0.1), then use telnet, the session starts instantly.

                      What would an SSH session change to remove the delay?

                      tonyshowoffT 1 Reply Last reply Reply Quote 1
                      • tonyshowoffT
                        tonyshowoff @anthonyh
                        last edited by tonyshowoff

                        @anthonyh said in Weird telnet Issue:

                        Here is where I'm boggled that I think some are missing...

                        If I am using telnet directly on my workstation, I get a 10 or so second delay before the session starts.

                        If I SSH into my workstation, then use telnet, the session starts instantly.

                        If I SSH into my workstation, from my workstation (e.g. ssh 127.0.0.1), then use telnet, the session starts instantly.

                        What would an SSH session change to remove the delay?

                        Have you checked the DNS lookup configuration for sshd_config? Because 127.0.0.1 is in the hosts file so there is no look up time, ditto with telnetd.

                        This delay issue is almost always related to DNS queries, with very few exceptions. It doesn't matter what machine you are coming from or going to, if the "remote" machine doesn't have your connecting IP in its hosts file and it's configured to look up the host, you'll get a delay, especially with slow DNS queries, typically that 10 seconds means it probably timed out the request.

                        anthonyhA 1 Reply Last reply Reply Quote 1
                        • anthonyhA
                          anthonyh @tonyshowoff
                          last edited by

                          @tonyshowoff

                          That makes sense, but I still don't understand how an SSH session changes the behavior of telnet. Wouldn't be the same as if I'm executing telnet on the workstation itself?

                          tonyshowoffT 1 Reply Last reply Reply Quote 0
                          • tonyshowoffT
                            tonyshowoff @anthonyh
                            last edited by tonyshowoff

                            @anthonyh said in Weird telnet Issue:

                            @tonyshowoff

                            That makes sense, but I still don't understand how an SSH session changes the behavior of telnet. Wouldn't be the same as if I'm executing telnet on the workstation itself?

                            When you go through SSH and execute in the shell, it's probably using a different connecting IP, I'd check that to see if you're getting the same result. Plus also you could just do:

                            Edit /etc/ssh/sshd_config

                            Change UseDNS to No

                            restart sshd

                            And I haven't used telnetd in about 15 years, but a potential solution, which may or may not work any more or for Fedora (I mostly use FreeBSD):

                            Edit /etc/hosts.allow

                            Add to a new line:

                            in.telnetd: ALL
                            

                            Restart via inetd or xinetd or whatever you're using, unless it has its own service controller. Telnet is pretty much obsolete because it's plaintext.

                            1 Reply Last reply Reply Quote 1
                            • anthonyhA
                              anthonyh @travisdh1
                              last edited by

                              This post is deleted!
                              1 Reply Last reply Reply Quote 0
                              • anthonyhA
                                anthonyh
                                last edited by

                                Hmm. Something I just discovered is that even running "telnet --help" gives me the exact same delay.

                                1 Reply Last reply Reply Quote 1
                                • 1 / 1
                                • First post
                                  Last post