@Signature public void setUserInfo(Environment env, @Nullable @Arg(type = ARRAY) Memory ui) { if (ui.isNull()) { getWrappedObject().setUserInfo(null); } else { UserInfoBean userInfo = ui.toValue(ArrayMemory.class).toBean(env, UserInfoBean.class); getWrappedObject().setUserInfo(userInfo); } }
this.session.setUserInfo(ui); this.session.setDaemonThread(true); this.session.connect();
jschSession.setPassword(pw); jschSession.setUserInfo(this.userInfoWrapper);
if (credentialsProvider != null && (!hc.isBatchMode() || !credentialsProvider.isInteractive())) { session.setUserInfo(new CredentialsProviderUserInfo(session, credentialsProvider));
@Override protected void configure(OpenSshConfig.Host host, Session session) { session.setUserInfo(new PassphraseUserInfo(passphrase)); }
@Override protected void configure(OpenSshConfig.Host host, Session session) { session.setUserInfo(new PassphraseUserInfo(passphrase)); }
@Override protected void configure(OpenSshConfig.Host host, Session session) { session.setUserInfo(new PassphraseUserInfo(passphrase)); }
@Override protected void configure(Host hc, Session session) { session.setUserInfo(new PasswordSSHUserInfo(password)); }
public static Session createSession(String hostname, int port, String username, File keyFile, final String passphrase) throws JSchException { JSch jsch = new JSch(); if (keyFile != null) { jsch.addIdentity(keyFile.getAbsolutePath(), passphrase); } Session session = jsch.getSession(username, hostname, port); UserInfo ui = createUserInfo(passphrase); session.setUserInfo(ui); session.setConfig("compression.s2c", "zlib@openssh.com,zlib,none"); session.setConfig("compression.c2s", "zlib@openssh.com,zlib,none"); session.setConfig("compression_level", "9"); return session; }
public Session openSession() throws JSchException { JSch jsch = new JSch(); Session session = jsch.getSession(user, host, port); UserInfo ui = new SSHUserInfo(password); session.setUserInfo(ui); session.setTimeout(timeout); session.connect(timeout); return session; } }
public static Session createSession(String hostname, int port, String username, File keyFile, final String passphrase) throws JSchException { JSch jsch = new JSch(); if (keyFile != null) { jsch.addIdentity(keyFile.getAbsolutePath(), passphrase); } Session session = jsch.getSession(username, hostname, port); UserInfo ui = createUserInfo(passphrase); session.setUserInfo(ui); session.setConfig("compression.s2c", "zlib@openssh.com,zlib,none"); session.setConfig("compression.c2s", "zlib@openssh.com,zlib,none"); session.setConfig("compression_level", "9"); return session; }
@Override protected void configure(Host host, Session session) { session.setConfig("StrictHostKeyChecking", "no"); session.setConfig("PreferredAuthentications", "publickey,password"); // Awful use of App singleton but not really any other way to get hold of a provider that needs // to have been initialised with an Android context UserInfo userInfo = new CredentialsProviderUserInfo(session, SGitApplication.getJschCredentialsProvider()); session.setUserInfo(userInfo); }
public Session login(JSch jsch, String host) throws JSchException { Session session; jsch.addIdentity(credentials.loadIdentity(jsch), null); session = jsch.getSession(user, host); session.setUserInfo(this); return session; }
protected boolean connect() { boolean success = true; try { session = jsch.getSession(user, host, port); session.setUserInfo(getUserInfo()); session.setConfig(getSessionConfig()); session.setPassword(password); session.connect(TIMEOUT); } catch (JSchException e) { logger.error(e.getMessage().replace("\n", " ")); success = false; } return success; }
protected Session createSession() throws JSchException { JSch sch = new JSch(); Session session = sch.getSession(getCurrentTestName(), TEST_LOCALHOST, sshPort); session.setUserInfo(new SimpleUserInfo(getCurrentTestName())); session.connect(); return session; }
protected Session createSession() throws JSchException { JSch sch = new JSch(); Session session = sch.getSession(getCurrentTestName(), TEST_LOCALHOST, sshPort); session.setUserInfo(new SimpleUserInfo(getCurrentTestName())); session.connect(); return session; }
protected Session createSession() throws JSchException { JSch sch = new JSch(); Session session = sch.getSession(getCurrentTestName(), TEST_LOCALHOST, sshPort); session.setUserInfo(new SimpleUserInfo(getCurrentTestName())); session.connect(); return session; }
@Override protected boolean doAuthenticate() { final Session session = getConnection().getSession(); session.setUserInfo(new JSchUserInfo()); session.setPassword(getUser().getPassword().getPlainText()); return true; }
@Override protected boolean doAuthenticate() { final Session session = getConnection().getSession(); session.setUserInfo(new JSchUserInfo()); session.setPassword(getUser().getPassword().getPlainText()); return true; }
public Session createSession(IJSchLocation location, UserInfo uinfo) throws JSchException { Session session=createSession(location.getHost(), location.getPort(), location.getUsername()); if(uinfo==null){ IUserAuthenticator authenticator=getPluggedInAuthenticator(); if(authenticator==null) authenticator=new NullUserAuthenticator(); uinfo=new UserInfoImpl(location, authenticator, (JSchCorePlugin.getPlugin().getTimeout() * 1000)); } if(uinfo!=null) session.setUserInfo(uinfo); return session; }