SSH-Agent
The SSH-Agent service shares SSH keys from the host into project containers, enabling git operations, SSH connections, and other key-based authentication inside containers.
How It Works
Section titled “How It Works”- The SSH-Agent container runs an
ssh-agentprocess. - Private keys from the host are mounted read-only into the container.
- The agent socket is shared with project containers via a Docker volume.
Key Detection
Section titled “Key Detection”dde automatically scans ~/.ssh/ for private key files. It includes files that:
- Contain the string
PRIVATE KEYin their content - Are at the root level of
~/.ssh/(not in subdirectories)
It excludes: *.pub, known_hosts, known_hosts.old, config, authorized_keys.
Configured Keys
Section titled “Configured Keys”Keys can be explicitly configured in the global config (ssh.keys). When configured keys are present, automatic detection is skipped and only the configured keys are mounted.
Using SSH in Containers
Section titled “Using SSH in Containers”Once the SSH-Agent is running, SSH operations inside containers work transparently:
# Inside a project containergit clone git@github.com:org/repo.gitssh user@server.example.comThe SSH_AUTH_SOCK environment variable points to the shared agent socket automatically.