Recently I am working on an embedded project, and for some reason, it doesn't contain ssh or other tools like this except telnet, I have to use telnet.

But after days of working, I'm annoyed by the automatic close of the connection (not exact automatically, but you have to type something in it, then it will quit the telnet).

Here is the details:

I login into a remote embedded system, then leave it there and do something outside this terminal or just wait, after 2 mins(120s), I type a command in the telnet session, it will display:

~ # Connection closed by foreign host. 

then exit the telnet, and I have to connect to it again using telnet.

On the first sight, I thought maybe there is some configuration such like timeout about telnet in the embedded system, but I found nothing, and I told the timeout to my colleague, and he tried to telnet into it (in Xshell) on his Windows PC and wait it for 2 mins, it works fine, and he said that that problem never happened him.

So I thought maybe I had some configuration in my system (CentOS 6.5 32-bit), but didn't find anything either.

So I guessed, may it was the problem of my shell, I was using fish-shell, so I tried it in bash-shell, but it was the same in bash-shell, so I tried another terminal, the same result.

So I tried it without tmux, the same result.

So then I got a Windows PC in my VirtualBox which was installed in my CentOS6.5 32-bit, and I tried to telnet into the embedded system using Xshell, and it exited more quickly, less than 2 minutes.

So I don't know what to do? Does anyone know how to avoid the problem?

  • 1
    The embedded system is remote - what else is in the path? Two minute is very low timeout for a firewall to end the session. Is there anywhere along the path you can do a tcpump to see where the RST packet originates? – Paul Nov 16 '17 at 5:45
  • @Paul no tcpump is in the path of the embedded system, and no firewall is enabled on both sides. – CodyChan Nov 16 '17 at 6:58
  • Sorry I meant tcpdump, is there anywhere you can run it? – Paul Nov 16 '17 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.