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);
}