-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux ssh agent Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to ssh-agent on Linux, covering Arch Linux, CachyOS, and other distributions including SSH key agent, key caching, and passwordless authentication.
ssh-agent holds private keys in memory.
Uses:
- Key caching: Cache decrypted keys
- Passwordless auth: Avoid repeated passwords
- Key management: Manage SSH keys
- Security: Keep keys in memory
Why it matters:
- Convenience: Avoid entering passphrase repeatedly
- Security: Keys stay in memory
- Automation: Enable automated SSH
Basic usage:
# Start ssh-agent
eval "$(ssh-agent -s)"
# Starts agent and sets environmentVerify running:
# Check agent
ssh-add -l
# Lists loaded keysAdd to agent:
# Add key to agent
ssh-add ~/.ssh/id_ed25519
# Adds key (prompts for passphrase)Add all:
# Add all default keys
ssh-add
# Adds default keysShow loaded keys:
# List keys
ssh-add -l
# Shows fingerprint of loaded keysDelete key:
# Remove key
ssh-add -d ~/.ssh/id_ed25519
# -d = delete (removes key)Start agent:
# Start agent
eval "$(ssh-agent -s)"
# Then add keys
ssh-add ~/.ssh/id_ed25519This guide covered ssh-agent usage, key caching, and passwordless authentication for Arch Linux, CachyOS, and other distributions.
- ssh-keygen Guide - Generate keys
- SSH Configuration - SSH setup
- ssh-add Guide - Key management
-
ssh-agent Documentation:
man ssh-agent
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.