Kill all the previous sessions in PuTTY

0

I've opened a telnet connection to another server, however when I close PuTTY it still looks like I am logged in to another terminal. I think this happens every time PuTTY gets idle. Does someone know how to avoid this? I tried killing the process and restarting the computer, but it's still the same, and I can guarantee that nobody else is logged in with the account.

Sora

Posted 2019-03-26T05:49:02.953

Reputation: 1

1Do you have root/admin access to the server? Can you check whether it is receiving any packets on the old connection? – user1686 – 2019-03-26T06:19:30.307

I am not the admin, but I requested the admins to check and they told me they cannot see my active session. – Sora – 2019-03-26T06:26:54.053

Answers

0

It sounds like the server is behind a firewall that is a little bit too strict. When the connection becomes idle for too long, the firewall "forgets" it and removes from the state table – even though the TCP layer on both hosts still considers the connection active.

When this happens, the firewall no longer allows any packets belonging to the connection – neither regular data packets, nor even the TCP FIN or TCP RST packets which are supposed to indicate that the connection has been closed.

(Normally this timeout should be set to at least several hours for TCP connections, but some vendors – e.g. Mikrotik RouterOS – set very short timeouts by default.)

As a user, you could try enabling "keepalive" features in PuTTY as a workaround – i.e. send dummy packets so that firewalls think the connection is still in use:

  • ConnectionSeconds between keepalives: something like 60 or 300 seconds. (This uses protocol-specific packets but it should work for Telnet.)

  • ConnectionLow-level TCP options → [✔] Enable TCP keepalives. (This works for any protocol, but doesn't let you specify how often to send the keepalive packets; it might be in the range of hours.)

user1686

Posted 2019-03-26T05:49:02.953

Reputation: 283 655