Package org.crsh.auth

Examples of org.crsh.auth.SimpleAuthenticationPlugin


    //
    int port = PORTS.getAndIncrement();

    //
//    IOHandler handler = new IOHandler();
    SimpleAuthenticationPlugin auth = new SimpleAuthenticationPlugin();

    //
    Foo foo = new Foo();
    TestPluginLifeCycle lifeCycle = new TestPluginLifeCycle(new SSHPlugin(), foo, auth);
    lifeCycle.setProperty(SSHPlugin.SSH_PORT, port);
    lifeCycle.setProperty(SSHPlugin.SSH_SERVER_IDLE_TIMEOUT, 10 * 60 * 1000);
    lifeCycle.setProperty(SSHPlugin.SSH_SERVER_AUTH_TIMEOUT, 10 * 60 * 1000);
    lifeCycle.setProperty(SSHPlugin.SSH_ENCODING, Utils.UTF_8);
    lifeCycle.setProperty(AuthenticationPlugin.AUTH, Arrays.asList(auth.getName()));
    lifeCycle.setProperty(SimpleAuthenticationPlugin.SIMPLE_USERNAME, "root");
    lifeCycle.setProperty(SimpleAuthenticationPlugin.SIMPLE_PASSWORD, "");
    lifeCycle.start();
    SSHClient client = new SSHClient(port).connect();

View Full Code Here

TOP

Related Classes of org.crsh.auth.SimpleAuthenticationPlugin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.