Package com.jcraft.jsch.agentproxy

Examples of com.jcraft.jsch.agentproxy.RemoteIdentityRepository


     * @return true if connected to agent, false otherwise
     */
    private boolean attemptAgentUse(JSch jsch) {
        try {
            Connector con = ConnectorFactory.getDefault().createConnector();
            jsch.setIdentityRepository(new RemoteIdentityRepository(con));
            return true;
        } catch (AgentProxyException e) {
            Message.verbose(":: SSH :: Failure connecting to agent :: " + e.toString());
            return false;
        }
View Full Code Here


      } else if (loginCredentials.hasUnencryptedPrivateKey()) {
         byte[] privateKey = loginCredentials.getPrivateKey().getBytes();
         jsch.addIdentity(loginCredentials.getUser(), privateKey, null, emptyPassPhrase);
      } else if (agentConnector.isPresent()) {
         JSch.setConfig("PreferredAuthentications", "publickey");
         jsch.setIdentityRepository(new RemoteIdentityRepository(agentConnector.get()));
      }
      java.util.Properties config = new java.util.Properties();
      config.put("StrictHostKeyChecking", "no");
      session.setConfig(config);
      if (proxy.isPresent())
View Full Code Here

      } else if (loginCredentials.hasUnencryptedPrivateKey()) {
         byte[] privateKey = loginCredentials.getPrivateKey().getBytes();
         jsch.addIdentity(loginCredentials.getUser(), privateKey, null, emptyPassPhrase);
      } else if (agentConnector.isPresent()) {
         JSch.setConfig("PreferredAuthentications", "publickey");
         jsch.setIdentityRepository(new RemoteIdentityRepository(agentConnector.get()));
      }
      java.util.Properties config = new java.util.Properties();
      config.put("StrictHostKeyChecking", "no");
      session.setConfig(config);
      if (proxy.isPresent())
View Full Code Here

    try {
      JSch sch = new JSch();

      ConnectorFactory cf = ConnectorFactory.getDefault();
      Connector con = cf.createConnector();
      IdentityRepository irepo = new RemoteIdentityRepository(con);
      sch.setIdentityRepository(irepo);

      String knownHosts = knownHosts();
      sch.setKnownHosts(knownHosts);
View Full Code Here

        try
        {
            Connector connector = ConnectorFactory.getDefault().createConnector();
            if ( connector != null )
            {
                IdentityRepository repo = new RemoteIdentityRepository( connector );
                sch.setIdentityRepository( repo );
            }
        }
        catch ( AgentProxyException e )
        {
View Full Code Here

        }
        else
        {
            jsch = new JSch();
            jsch.setConfig("PreferredAuthentications", "publickey");
            IdentityRepository irepo = new RemoteIdentityRepository(con);
            jsch.setIdentityRepository(irepo);

            //why these in super is private, I don't know
            knownHosts(jsch, fs);
            identities(jsch, fs);
View Full Code Here

                    }
                    else
                    {
                        jsch = new JSch();
                        jsch.setConfig("PreferredAuthentications", "publickey");
                        IdentityRepository irepo = new RemoteIdentityRepository(con);
                        jsch.setIdentityRepository(irepo);

                        //why these in super is private, I don't know
                        knownHosts(jsch, fs);
                        identities(jsch, fs);
View Full Code Here

        }
        else
        {
            jsch = new JSch();
            jsch.setConfig("PreferredAuthentications", "publickey");
            IdentityRepository irepo = new RemoteIdentityRepository(con);
            jsch.setIdentityRepository(irepo);

            //why these in super is private, I don't know
            knownHosts(jsch, fs);
            identities(jsch, fs);
View Full Code Here

                    }
                    else
                    {
                        jsch = new JSch();
                        jsch.setConfig("PreferredAuthentications", "publickey");
                        IdentityRepository irepo = new RemoteIdentityRepository(con);
                        jsch.setIdentityRepository(irepo);

                        //why these in super is private, I don't know
                        knownHosts(jsch, fs);
                        identities(jsch, fs);
View Full Code Here

                    }
                    else
                    {
                        jsch = new JSch();
                        jsch.setConfig("PreferredAuthentications", "publickey");
                        IdentityRepository irepo = new RemoteIdentityRepository(con);
                        jsch.setIdentityRepository(irepo);

                        //why these in super is private, I don't know
                        knownHosts(jsch, fs);
                        identities(jsch, fs);
View Full Code Here

TOP

Related Classes of com.jcraft.jsch.agentproxy.RemoteIdentityRepository

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.