Examples of KBIAuthenticationClient


Examples of com.sshtools.j2ssh.authentication.KBIAuthenticationClient

      SshConnectionProperties properties = new SshConnectionProperties();
      properties.setHost(hostname);
      // Connect to the host
      ssh.connect(properties);
      // Create a password authentication instance
      KBIAuthenticationClient kbi = new KBIAuthenticationClient();
      // Get the users name
      System.out.print("Username? ");
      // Read the password
      String username = reader.readLine();
      kbi.setUsername(username);
      kbi.setKBIRequestHandler(new KBIRequestHandler() {
        public void showPrompts(String name, String instructions,
                                KBIPrompt[] prompts) {
          System.out.println(name);
          System.out.println(instructions);
          String response;
View Full Code Here

Examples of com.sshtools.j2ssh.authentication.KBIAuthenticationClient

            PasswordChange.getInstance().setParentComponent(SshToolsApplicationClientPanel.this);
        } else if (instance instanceof PublicKeyAuthenticationClient) {
            PublicKeyAuthenticationPrompt prompt = new PublicKeyAuthenticationPrompt(SshToolsApplicationClientPanel.this);
            instance.setAuthenticationPrompt(prompt);
        } else if (instance instanceof KBIAuthenticationClient) {
            KBIAuthenticationClient kbi = new KBIAuthenticationClient();
            ((KBIAuthenticationClient) instance).setKBIRequestHandler(new KBIRequestHandlerDialog(
                    (Frame) SwingUtilities.getAncestorOfClass(Frame.class,
                        SshToolsApplicationClientPanel.this)));
        }
View Full Code Here

Examples of com.sshtools.j2ssh.authentication.KBIAuthenticationClient

            PasswordChange.getInstance().setParentComponent(SshToolsApplicationClientPanel.this);
        } else if (instance instanceof PublicKeyAuthenticationClient) {
            PublicKeyAuthenticationPrompt prompt = new PublicKeyAuthenticationPrompt(SshToolsApplicationClientPanel.this);
            instance.setAuthenticationPrompt(prompt);
        } else if (instance instanceof KBIAuthenticationClient) {
            KBIAuthenticationClient kbi = new KBIAuthenticationClient();
            ((KBIAuthenticationClient) instance).setKBIRequestHandler(new KBIRequestHandlerDialog(
                    (Frame) SwingUtilities.getAncestorOfClass(Frame.class,
                        SshToolsApplicationClientPanel.this)));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.