Top Description Methods
org.apache.sshd.agent

public Interface SshAgentFactory

Known Direct Implementers
org.apache.sshd.agent.local.LocalAgentFactory, org.apache.sshd.agent.local.ProxyAgentFactory, org.apache.sshd.agent.unix.UnixAgentFactory
Imports
java.io.IOException, java.util.List, org.apache.sshd.common.FactoryManager, org.apache.sshd.common.channel.ChannelFactory, org.apache.sshd.common.session.ConnectionService, .Session

The SshAgentFactory is used to communicate with an SshAgent.

Method Summary

Modifier and TypeMethod and Description
public SshAgent

Returns:

The SshAgent instance, or null if no SSH agent shall be used
createClient
(Session
the Session the SshAgent is to be created for; may be null
session
,
FactoryManager
The FactoryManager instance
manager
)

Create an SshAgent that can be used on the client side by the authentication process to send possible keys.

public SshAgentServer

Returns:

The SshAgentServer instance
createServer
(ConnectionService service)

Create the server side that will be used by other SSH clients.

public List<ChannelFactory>

Returns:

The ChannelFactory-ies used to create channels for agent forwarding on the client side. If null or empty, agent forwarding is not available.
getChannelForwardingFactories
(FactoryManager
The FactoryManager through which the request is made
manager
)

The channels are requested by the ssh server when forwarding a client request.

Method Detail

createClientback to summary
public SshAgent createClient(Session session, FactoryManager manager) throws IOException

Create an SshAgent that can be used on the client side by the authentication process to send possible keys.

Parameters
session:Session

the Session the SshAgent is to be created for; may be null

manager:FactoryManager

The FactoryManager instance

Returns:SshAgent

The SshAgent instance, or null if no SSH agent shall be used

Exceptions
IOException:
If failed to create the client
createServerback to summary
public SshAgentServer createServer(ConnectionService service) throws IOException

Create the server side that will be used by other SSH clients. It will usually create a channel that will forward the requests to the original client.

Parameters
service:ConnectionService

The ConnectionService to use

Returns:SshAgentServer

The SshAgentServer instance

Exceptions
IOException:
If failed to create the server
getChannelForwardingFactoriesback to summary
public List<ChannelFactory> getChannelForwardingFactories(FactoryManager manager)

The channels are requested by the ssh server when forwarding a client request. The channel will receive agent requests and needs to forward them to the agent, either local or through another proxy.

Parameters
manager:FactoryManager

The FactoryManager through which the request is made

Returns:List<ChannelFactory>

The ChannelFactory-ies used to create channels for agent forwarding on the client side. If null or empty, agent forwarding is not available.