Detect ssh properly