List of usage examples for org.apache.commons.vfs2.provider.sftp TrustEveryoneUserInfo TrustEveryoneUserInfo
TrustEveryoneUserInfo
From source file:com.sonicle.webtop.vfs.sfs.SftpSFS.java
@Override protected void configureOptions() throws FileSystemException { SftpFileSystemConfigBuilder builder = SftpFileSystemConfigBuilder.getInstance(); builder.setUserDirIsRoot(fso, false); builder.setUserInfo(fso, new TrustEveryoneUserInfo()); }
From source file:adams.scripting.connection.AbstractSSHConnection.java
/** * Creates a new {@link Session} object, but does not connect or establish * the tunnel./*from w w w.j a va 2s . co m*/ * * @return the Session object * @throws Exception */ protected Session createSession(String host, int port) throws Exception { Session result; JSch jsch; String password; password = m_Password.getValue(); jsch = JSchUtils.newJsch(m_KnownHosts); switch (m_AuthenticationType) { case CREDENTIALS: result = JSchUtils.newSession(jsch, m_User, password, host, port); break; case PUBLIC_KEY: result = JSchUtils.newSession(jsch, m_User, m_PrivateKeyFile, password, host, port); break; default: throw new IllegalStateException("Unhandled authentication type: " + m_AuthenticationType); } JSchUtils.configureStrictHostKeyChecking(result, m_StrictHostKeyChecking); result.setUserInfo(new TrustEveryoneUserInfo()); return result; }