I have a script in bash, runing multiple putty sessions in my linux vm. For example, i open the connection to run a couple of commands, when it finishes it saves the values, closes the session, opens a new session and runs a couple more.
This script is supposed to run for 60 hours, more or less, so i need to have everythin automated.
My issue is, when the putty session is open, and connected to the device i need, if at some point the device reboots ( dont know why it reboots, it just does), a window in putty appears saying the connection was terminated (obviously). The problem is that the window stays open ulti i press the "ok" button. So my script just stops there until some manual interaction with the putty session.
Is there a way to automatically terminate the putty session if a disconnection happens? the option "Close window on exit" is already set as "Always".
Thank you for your help, if you need some more information just let me know! regards