# SSH Agent

SSH Agent is a Docker-based remote build node that lets the Jenkins controller securely connect over SSH (Secure Shell) and run jobs on a separate machine. It is open source and self-hosted, installable on Docker Hub.

Canonical page: https://ourlocalhost.com/app/6162/ssh-agent

## Description

SSH Agent is a Docker-based remote build node that lets the Jenkins controller securely connect over SSH (Secure Shell) and run jobs on a separate machine. It is for teams that want to move builds, tests, and other automated tasks away from the controller, keeping the main system organised and reducing its load.

## Platform availability

Available on 0 of 10 platforms.

## Health score

57/100 (Fair), based on 5 of 5 factors.
- Maintained: 60 (last commit 156 days ago)
- Popular: 63 (1,487 GitHub stars)
- Easy to install: 25 (0 install platforms, install notes, Docker image)
- Light to run: 80 (1 GB minimum RAM, runs on ARM)
- Security check: 60 (no serious findings, 2 minor, CI, OpenSSF Scorecard 3.3/10)

## Links

- Docker Hub: https://hub.docker.com/r/jenkins/ssh-agent
- GitHub: https://github.com/webfactory/ssh-agent

## Common questions

### How do I make the Jenkins SSH agent reachable from Jenkins?

Publish the container SSH port by mapping a host port to container port 22, such as publishing 2200 to 22. If you skip the port mapping, the container SSH port is hidden and Jenkins cannot connect.

### How can I prevent the first git clone from stalling on host verification?

Pre-add git server host entries using variables such as JENKINS_AGENT_SSH_KNOWNHOST_0 and JENKINS_AGENT_SSH_KNOWNHOST_1. This helps the agent recognize those servers instead of waiting for a server identity check.

### Can ssh-agent run as a service and load unencrypted keys automatically?

Yes, ssh-agent can be started as a systemd service. The referenced setup also automatically adds unencrypted keys after the service starts.

---
Source: Our Local Host (https://ourlocalhost.com/app/6162/ssh-agent), the self-hosted and open-source app directory.
