parse_remote_port: error out on illegal port numbers better