|Do you know where your variables are?|
Re^2: Net::OpenSSH reconnect master if conn. closedby Bolemo (Acolyte)
|on Sep 27, 2020 at 12:38 UTC||Need Help??|
Interesting! Thank you.
I will keep that in mind. I will first experiment with a simple $ssh->check_master
Letís say that I created a master connection this way: my $ssh = Net::OpenSSH->new(...);
Before calling a slave ssh command with open3 or capture, I will test $ssh to check if it is still connected or not, like:
I will see how light or heavy on CPU this check_master function is.
EDIT: no errors and the script works fine. Killed the ssh process on the remote device to test and...
The script works, but not as expected. Seems that an ssh connection is recreated allowing the slave command to be run, but there is no more master ssh connection sticking. After first disconnect event, it reconnects each time instead of staying connected like the first time.