Use ip_address instead public_dns_name when calling connect.