Legacy Product Discussions

SSH reset or multiple sessions

derekdoucette
29,275 Views

Is there a way to clear out an existing ssh session that may have been disconnected by loss of network?  I have on a few occasions lost my network connection while ssh'd into a filer and then get connection closed errors when trying to reconnect.  After 10-20 minutes I'm guessing that the session times out and I am able to connect again.  I understand the issue with having more than 1 ssh concurrent ssh connection, but I was wondering if anyone knows a method to kill the old session via filerview or something similar.  I have tried to stop and restart the ssh daemon with no luck.  This is on ONTAP 7.3.3.

1 ACCEPTED SOLUTION

chriskranz
29,274 Views

If you have a console or RLM/BMC connection you can do "logout telnet" and this will disconnect any SSH sessions.

If you have a already trusted configured SSH or RSH client (SSH in terms of issuing SSH commands and scripting, not in terms of full SSH sessions), then you can do the same thing like "rsh filer_name logout telnet" or "ssh filer_name logout telnet".

Without any of the above, you'll just have to wait for it to timeout I'm afraid. Default is 60 minutes, but I'd recommend dropping this to 5 or 10 minutes for SSH.

View solution in original post

5 REPLIES 5

chriskranz
29,275 Views

If you have a console or RLM/BMC connection you can do "logout telnet" and this will disconnect any SSH sessions.

If you have a already trusted configured SSH or RSH client (SSH in terms of issuing SSH commands and scripting, not in terms of full SSH sessions), then you can do the same thing like "rsh filer_name logout telnet" or "ssh filer_name logout telnet".

Without any of the above, you'll just have to wait for it to timeout I'm afraid. Default is 60 minutes, but I'd recommend dropping this to 5 or 10 minutes for SSH.

derekdoucette
29,274 Views

Thanks for the information.  Can you point me to where the timeout setting is stored?

mhellberg
29,274 Views

Hi,

Should be:

options ssh.idle.timeout

Regards

anilaw
29,274 Views

True, the problem of getting the connection cleanup would be solved by setting the timeout to 5-10mins but,

this would only add to problem of connection time-out very frequently if u take a small break or do not do any activity

on that terminal. I would rather recommend the cleanup using the "rsh filer_name logout telnet" or "ssh filer_name logout telnet".

which is mentioned above.

JyothishC
24,204 Views

@chriskranz wrote:

If you have a console or RLM/BMC connection you can do "logout telnet" and this will disconnect any SSH sessions.

 

If you have a already trusted configured SSH or RSH client (SSH in terms of issuing SSH commands and scripting, not in terms of full SSH sessions), then you can do the same thing like "rsh filer_name logout telnet" or "ssh filer_name logout telnet".

 

Without any of the above, you'll just have to wait for it to timeout I'm afraid. Default is 60 minutes, but I'd recommend dropping this to 5 or 10 minutes for SSH.


Thank you Buddy. I faced the same issue, Filer>logout telnet command did job for me in a second.

 

thank you very much.



Public