Package org.apache.sshd.agent

Examples of org.apache.sshd.agent.SshAgentFactory


    protected boolean handleAgentForwarding(Buffer buffer) throws IOException {
        boolean wantReply = buffer.getBoolean();

        final ServerSession server = (ServerSession) session;
        final ForwardingFilter filter = server.getServerFactoryManager().getTcpipForwardingFilter();
        final SshAgentFactory factory = server.getServerFactoryManager().getAgentFactory();
        if (factory == null || (filter != null && !filter.canForwardAgent(server))) {
            if (wantReply) {
                buffer = session.createBuffer(SshConstants.Message.SSH_MSG_CHANNEL_FAILURE, 0);
                buffer.putInt(recipient);
                writePacket(buffer);
View Full Code Here


    }

    protected boolean handleAgentForwarding(Buffer buffer) throws IOException {
        final ServerSession server = (ServerSession) session;
        final ForwardingFilter filter = server.getFactoryManager().getTcpipForwardingFilter();
        final SshAgentFactory factory = server.getFactoryManager().getAgentFactory();
        if (factory == null || (filter != null && !filter.canForwardAgent(server))) {
            return false;
        }

        String authSocket = service.initAgentForward();
View Full Code Here

        for (Object o : identities) {
            if (o instanceof KeyPair) {
                ids.add(new KeyPairIdentity(session.getFactoryManager(), (KeyPair) o));
            }
        }
        SshAgentFactory factory = session.getFactoryManager().getAgentFactory();
        if (factory != null) {
            this.agent = factory.createClient(session.getFactoryManager());
            for (SshAgent.Pair<PublicKey, String> pair : agent.getIdentities()) {
                ids.add(new KeyAgentIdentity(agent, pair.getFirst()));
            }
        } else {
            this.agent = null;
View Full Code Here

    }

    protected boolean handleAgentForwarding(Buffer buffer) throws IOException {
        final ServerSession server = (ServerSession) session;
        final ForwardingFilter filter = server.getFactoryManager().getTcpipForwardingFilter();
        final SshAgentFactory factory = server.getFactoryManager().getAgentFactory();
        if (factory == null || (filter != null && !filter.canForwardAgent(server))) {
            return false;
        }

        String authSocket = service.initAgentForward();
View Full Code Here

    protected boolean handleAgentForwarding(Buffer buffer) throws IOException {
        boolean wantReply = buffer.getBoolean();

        final ServerSession server = (ServerSession) session;
        final ForwardingFilter filter = server.getServerFactoryManager().getForwardingFilter();
        final SshAgentFactory factory = server.getServerFactoryManager().getAgentFactory();
        if (factory == null || (filter != null && !filter.canForwardAgent(server))) {
            if (wantReply) {
                buffer = session.createBuffer(SshConstants.Message.SSH_MSG_CHANNEL_FAILURE, 0);
                buffer.putInt(recipient);
                session.writePacket(buffer);
View Full Code Here

                log.warn("Blocking SSHD port forwarding");
                return false;
            }
        });

        sshd.setAgentFactory(new SshAgentFactory() {
            @Override
            public NamedFactory<Channel> getChannelForwardingFactory() {
                log.warn("Blocking SSHD agent functionality");
                throw new IllegalStateException("Blocking SSHD agent functionality");
            }
View Full Code Here

TOP

Related Classes of org.apache.sshd.agent.SshAgentFactory

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.