agent

Manage ssh-agent lifecycle and ssh-add key operations with lifetimes and confirmations.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill agent-theslashdojo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/ssh/agent
Command: npx skills add https://github.com/theslashdojo/dojo --skill agent-theslashdojo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openssh-client, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill centralizes management of the OpenSSH authentication agent so users can start an agent, load or remove passphrase-protected private keys, enforce key lifetimes or confirmation prompts, and avoid repeated interactive unlocks across many SSH operations.

Core Features & Use Cases

  • Manage the agent lifecycle: start an agent and export the agent environment so other commands can use it.
  • Key operations: add keys with optional lifetimes and confirmation, list loaded identities, remove specific keys or clear all identities.
  • Security and operational guidance: minimize forwarding risk for bastion hops, surface permission-related failures, and provide a deterministic wrapper script for automation.
  • Use Case: a developer or SRE needs to unlock a passphrase-protected key once, reuse it for multiple git pushes and remote copies, and then clear identities when the session ends.

Quick Start

Run the included manage-agent.sh wrapper to start the agent, add a key with a one hour lifetime and confirmation if desired, then perform your SSH operations.

Frequently Asked Questions about agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep an ssh-agent unlocked for multiple SSH operations without re-entering my passphrase?

You can load a passphrase-protected private key into ssh-agent once per session, allowing it to be reused across multiple SSH operations like git pushes and remote copies without repeated interactive unlocks.

Can I set a lifetime limit on SSH keys loaded into the ssh-agent?

Yes, you can add keys with optional lifetimes using ssh-add lifetime flags, ensuring loaded identities automatically expire from the agent after a specified duration.

What is the best way to automate ssh-agent startup and key loading in SRE workflows?

Using a deterministic wrapper script to start the agent, export SSH_AUTH_SOCK and SSH_AGENT_PID, and invoke ssh-add provides a reliable automation interface for SRE workflows.

How does agent forwarding work with bastion hosts and what are the security risks?

Agent forwarding allows keys to be used through bastion hosts, but it carries security risks if the bastion is compromised, so operational guidance is needed to minimize forwarding exposure.

Do I need openssh-client to manage SSH agent identities and confirmation prompts?

Yes, openssh-client is required as it provides the underlying ssh-agent and ssh-add utilities needed to manage identities, confirmation prompts, and key lifetimes.

Why does ssh-agent require exporting SSH_AUTH_SOCK and SSH_AGENT_PID environment variables?

Exporting SSH_AUTH_SOCK and SSH_AGENT_PID is required so that subsequent SSH commands and other terminal processes can locate and communicate with the active authentication agent.