Attempt to use private IP address if public IP address is not available

When connecting to instances hosted in a VPC, the instance may not have
a public IP address, and should be connected to using a VPN and the
instance's private IP address.