[JENKINS-21601] fix to close open ssh sessions

The init script block of code opens two ssh sessions but does not close them. Causing them to timeout and break the connection.