Stop typing your ssh keys into an ssh-agent one by one

SSH & Remote Administration

Stop typing your ssh keys into an ssh-agent one by one

🧩 The Challenge

Dealing with a dozen different keys for various projects and servers is a nightmare. I used to waste so much time running add commands manually every single morning until my fingers hurt.

💡 The Fix

Just point the agent at your whole directory of keys and be done with it. It saves you from having to remember which key belongs to which legacy client or internal cluster.

ssh-add ~/.ssh/id_*

⚙️ Why It Works

Passing the wildcard to ssh-add tells the utility to iterate through everything in your directory and load the valid private keys into memory automatically.

🚀 Pro-Tip: Add this line to your .bashrc or .zshrc if you want your keys loaded the second you open a terminal, but use a keyring manager if you care about security.

Linux Tips & Tricks | © ngelinux.com | 11/28/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted