I am creating/running a shell script from linux/Fedora server that is renaming multiple devices to default. Once it does the first device it hangs because the connection is not closing. the script is defaulting the ips and restarts the network service. How can I close the connection while that runs on the device?
Here is the script that resets them.
/bin/ssh $CHECKME -o ConnectTimeout=5 "/usr/local/bin/NameTerm.sh reset"
CHECKME is from where I get the ips of the connected devices and runs fine. The
NameTerm.sh is a shell script that sets the IP address back to 0.0.0.0 and then does a service network restart. I cannot alter the script.