} catch (IOException e) {
throw new RuntimeIOException("Cannot read key from private key file " + privateKeyFile, e);
}
client.authPublickey(username, keys);
} else if (password != null) {
PasswordFinder passwordFinder = getPasswordFinder();
client.auth(username, new AuthPassword(passwordFinder),
new AuthKeyboardInteractive(new RegularExpressionPasswordResponseProvider(passwordFinder, interactiveKeyboardAuthPromptRegex)));
}
sshClient = client;
connected();