client.setConnectTimeout(connectionTimeoutMillis);
client.addHostKeyVerifier(new PromiscuousVerifier());
try {
if (localAddress == null) {
client.connect(host, port);
} else {
client.connect(host, port, InetAddress.getByName(localAddress), localPort);
}
} catch (IOException e) {
throw new RuntimeIOException("Cannot connect to " + host + ":" + port, e);