pass = new String(p.getValue());
}
}
try {
final SessionHandler session = new SessionHandler(user, uri.getHost(), port, cp.getKnownHosts(), cp.getPrivateKey(), cp.getPublicKey(),
cp.getPassphrase());
if (pass != null)
session.setPassword(pass);
if (!credentialsProvider.isInteractive()) {
session.setUserInfo(new CredentialsProviderUserInfo(session.getSession(), credentialsProvider));
}
session.connect(tms);
return new JschSession(session.getSession(), uri);
} catch (JSchException e) {
throw new TransportException(uri, e.getMessage(), e);
}
}
return null;