Examples of KeyProvider


Examples of net.rubyeye.xmemcached.KeyProvider

  private KeyProvider keyProvider;
 
  @Override
  public void setUp() throws Exception {
    super.setUp();
    keyProvider = new KeyProvider() {
     
      public String process(String key) {
        // 现实中是基于某种规则进行字符串转换, 为了简单, 我直接用hashCode
        return String.valueOf(key.hashCode());
      }
View Full Code Here

Examples of net.schmizz.sshj.userauth.keyprovider.KeyProvider

        sshClient = new SSHClient();
      }
      if (getSSHClient().isConnected())
        return getSSHClient().startSession();

      KeyProvider pkey = getSSHClient().loadKeys(getPrivateKeyLoc(), getKeyPass());

      getSSHClient().loadKnownHosts();

      getSSHClient().connect(hostAddress);
      getSSHClient().authPublickey(getUsername(), pkey);
View Full Code Here

Examples of net.schmizz.sshj.userauth.keyprovider.KeyProvider

        ssh.loadKnownHosts();
        ssh.connect("dev4");
        try {
          PasswordFinder password = PasswordUtils.createOneOff("Reishee1".toCharArray());
          final String base = System.getProperty("user.home") + File.separator + ".ssh" + File.separator;
          final KeyProvider keyProvider = ssh.loadKeys(base + "id_dsa", password);
         
          final String user = System.getProperty("user.name");
          ssh.authPublickey(user, keyProvider);
         
            ssh.newSCPFileTransfer().download("/home/erikb/ninja.sh", new FileSystemFile("/tmp/"));
View Full Code Here

Examples of net.schmizz.sshj.userauth.keyprovider.KeyProvider

                if (password != null) {
                    logger.warn("The " + PRIVATE_KEY_FILE + " and " + PASSWORD + " connection options have both been set for the connection {}. Ignoring "
                            + PASSWORD
                            + " and using " + PRIVATE_KEY_FILE + ".", this);
                }
                KeyProvider keys;
                try {
                    if (passphrase == null) {
                        keys = client.loadKeys(privateKeyFile);
                    } else {
                        keys = client.loadKeys(privateKeyFile, passphrase);
View Full Code Here

Examples of net.schmizz.sshj.userauth.keyprovider.KeyProvider

            if (sshContext == null) {
                sshContext = ((SSHSecurityContextImpl) context.getSecurityContext(SSH_SECURITY_CONTEXT));
            }

            KeyProvider pkey = ssh.loadKeys(sshContext.getPrivateKeyLoc(), sshContext.getKeyPass());

            ssh.loadKnownHosts();
            ssh.authPublickey(sshContext.getUsername(), pkey);

            ssh.connect(context.getExecutionDescription().getHost().getType().getHostAddress());
View Full Code Here

Examples of net.schmizz.sshj.userauth.keyprovider.KeyProvider

        sshClient = new SSHClient();
      }
      if (getSSHClient().isConnected())
        return getSSHClient().startSession();

      KeyProvider pkey = getSSHClient().loadKeys(getPrivateKeyLoc(), getKeyPass());

      getSSHClient().loadKnownHosts();

      getSSHClient().connect(hostAddress);
      getSSHClient().authPublickey(getUsername(), pkey);
View Full Code Here

Examples of net.schmizz.sshj.userauth.keyprovider.KeyProvider

            if (sshContext == null) {
                sshContext = ((SSHSecurityContextImpl) context.getSecurityContext(SSH_SECURITY_CONTEXT));
            }

            KeyProvider pkey = ssh.loadKeys(sshContext.getPrivateKeyLoc(), sshContext.getKeyPass());

            ssh.loadKnownHosts();
            ssh.authPublickey(sshContext.getUsername(), pkey);

            ssh.connect(context.getExecutionDescription().getHost().getType().getHostAddress());
View Full Code Here

Examples of net.schmizz.sshj.userauth.keyprovider.KeyProvider

        sshClient = new SSHClient();
      }
      if (getSSHClient().isConnected())
        return getSSHClient().startSession();

      KeyProvider pkey = getSSHClient().loadKeys(getPrivateKeyLoc(), getKeyPass());

      getSSHClient().loadKnownHosts();

      getSSHClient().connect(hostAddress);
      getSSHClient().authPublickey(getUsername(), pkey);
View Full Code Here

Examples of net.schmizz.sshj.userauth.keyprovider.KeyProvider

            if (sshContext == null) {
                sshContext = ((SSHSecurityContextImpl) context.getSecurityContext(SSH_SECURITY_CONTEXT));
            }

            KeyProvider pkey = ssh.loadKeys(sshContext.getPrivateKeyLoc(), sshContext.getKeyPass());

            ssh.loadKnownHosts();
            ssh.authPublickey(sshContext.getUsername(), pkey);

            ssh.connect(context.getExecutionDescription().getHost().getType().getHostAddress());
View Full Code Here

Examples of net.schmizz.sshj.userauth.keyprovider.KeyProvider

            if (sshContext == null) {
                sshContext = ((SSHSecurityContextImpl) context.getSecurityContext(SSH_SECURITY_CONTEXT));
            }

            KeyProvider pkey = ssh.loadKeys(sshContext.getPrivateKeyLoc(), sshContext.getKeyPass());

            ssh.loadKnownHosts();
            ssh.authPublickey(sshContext.getUsername(), pkey);

            ssh.connect(context.getExecutionDescription().getHost().getType().getHostAddress());
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.