Framework
SSHAgent
Communicate with the local SSH agent and adapt agent-backed keys to NIOSSH.
Overview
SSHAgent implements the OpenSSH agent message framing needed to list identities and request signatures over SSH_AUTH_SOCK. It exposes a small async API that turns agent responses into SSHAgentKey values and, when needed, wraps those keys in NIOSSHPrivateKey values whose signing operations are delegated back to the agent.
The target keeps the raw protocol parsing in one place so higher-level code can work with Swift types instead of hand-built binary messages. It also preserves agent-specific behaviour such as RSA signing flags and response parsing rules.
Topics
Core Types
An actor that implements communication with SSH agents using the standard protocol.
A representation of an SSH key from the agent.
Errors raised whilst communicating with an SSH agent.
SSH agent protocol message identifiers used on the wire.
SSH agent signing flags defined by the OpenSSH agent protocol.
DataProtocol value that is also safe to send across concurrency domains.
Signing Support
Creates an SSH agent-backed NIOSSH private key.
Requests a signature from the SSH agent for the specified data and key.
A private key implementation that delegates signing operations to the SSH agent.
Protocol Handling
Requests the list of identities from the SSH agent.
Understand how the package maps OpenSSH agent messages to Swift types.