Ensure ssh cmd exit