Close SSH connections once we're done with them

Fixes "Waiting for SSH" hang at end of install