Added a function to reconnect and retry when ssh Session/Connect is disconnected.
Added a function to reconnect and retry when ssh Session/Connect is disconnected.