Merge "Catch ssh exception and detach in min scenario"