public Session createSession() throws JSchException {
JSch jsch = new JSch();
if (getPrivateKeyFile() != null) {
jsch.addIdentity(getPrivateKeyFile().getAbsolutePath());
}
ParsConf pars = new ParsConf();
pars.generatePars();
Document doc = pars.getDoc();
int port = Integer.parseInt(doc.getElementsByTagName("port").item(0).getTextContent());
Session session = jsch.getSession(getUsername(), getHost(), port);
session.setConfig(getConfig());
session.setUserInfo(getUserInfo());
return session;