if (vm.getPassword() != null && loginCredentials.getOptionalPassword() == null)
loginCredentials = loginCredentials.toBuilder().password(vm.getPassword()).build();
assert HostSpecifier.isValid(vm.getIPAddress());
if (!InetAddresses2.isPrivateIPAddress(vm.getIPAddress())) {
// not sure if the network is public or not, so we have to test
HostAndPort socket = HostAndPort.fromParts(vm.getIPAddress(), 22);
System.err.printf("testing socket %s%n", socket);
System.err.printf("testing ssh %s%n", socket);
checkSSH(socket);
} else {
System.err.printf("skipping ssh %s, as private%n", vm.getIPAddress());