Fix ssh port detection