SSH Forwarding
Claude often needs to clone private repos or push commits. ccpod offers two ways to give the container access to your SSH credentials.
Agent forwarding (recommended)
Section titled “Agent forwarding (recommended)”ssh: agentForward: true mountSshDir: falseccpod forwards your host’s SSH_AUTH_SOCK into the container. Claude can use any key your local agent has loaded — without those keys ever touching the container filesystem.
Requires ssh-agent to be running on the host with your keys added (ssh-add ~/.ssh/id_ed25519).
Safety check
Section titled “Safety check”If SSH_AUTH_SOCK contains :, ccpod rejects it before starting the container. The colon would corrupt the Docker bind-mount spec, so we fail fast rather than mount the wrong path.
Mount ~/.ssh read-only
Section titled “Mount ~/.ssh read-only”ssh: agentForward: false mountSshDir: trueMounts your ~/.ssh directory read-only at /root/.ssh. Use this when:
- The host doesn’t run an agent.
- You need access to
~/.ssh/configorknown_hostspatterns. - Agent forwarding doesn’t work for your setup (rare).
This is broader access than agent forwarding — the container can read every key file. Prefer agent forwarding when possible.
Both off
Section titled “Both off”ssh: agentForward: false mountSshDir: falseThe container has no SSH access. Cloning private repos won’t work. Use HTTPS + a token forwarded as an env var instead:
env: - GITHUB_TOKENCombining with restricted network
Section titled “Combining with restricted network”If you set network.policy: restricted, remember to add github.com (or your git host) to network.allow — SSH still needs to reach the host.