I need to do a VPN tunnel migration from 1 Cisco Asa to another one on 20 remote routers.
I wrote a little script that can automaticaly migrate the routers to the new ASA. However, when I run this script, the tunnel breaks ( which is logic, as I need to kill the old tunnel and set up the new tunnel in the script ), which makes me lose my SSH connection, and the last lines of the script do not go trough.
I put a reload command at the start of the script, so when this fails I can retry after the router rebooted.
Is there a clean way to do this ?