[SSHD-333] Ephemeral port handling is faulty