https://github.com/twfksh/zsh-ssh-agent
a bloat free utility plugin for managing ssh-agent in zsh
https://github.com/twfksh/zsh-ssh-agent
shell shell-script ssh ssh-agent zsh zsh-plugin zshrc
Last synced: 30 days ago
JSON representation
a bloat free utility plugin for managing ssh-agent in zsh
- Host: GitHub
- URL: https://github.com/twfksh/zsh-ssh-agent
- Owner: twfksh
- License: mit
- Created: 2024-07-13T20:06:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-02T17:33:29.000Z (4 months ago)
- Last Synced: 2025-12-05T16:36:38.975Z (3 months ago)
- Topics: shell, shell-script, ssh, ssh-agent, zsh, zsh-plugin, zshrc
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - ssh-agent (twfksh) - A bloat free utility plugin for managing ssh-agent in ZSH. This plugin automatically starts and manages `ssh-agent` whenever a new ternimal session starts. After running zsh-ssh-agent, you only need to `ssh-add` your keys once. The plugin will handle the rest. (Completions / ZSH on Windows)
- trackawesomelist - ssh-agent (twfksh) (⭐1) - A bloat free utility plugin for managing ssh-agent in ZSH. This plugin automatically starts and manages `ssh-agent` whenever a new ternimal session starts. After running zsh-ssh-agent, you only need to `ssh-add` your keys once. The plugin will handle the rest. (Recently Updated / [Jul 16, 2024](/content/2024/07/16/README.md))
- fucking-awesome-zsh-plugins - ssh-agent (twfksh) - A bloat free utility plugin for managing ssh-agent in ZSH. This plugin automatically starts and manages `ssh-agent` whenever a new ternimal session starts. After running zsh-ssh-agent, you only need to `ssh-add` your keys once. The plugin will handle the rest. (Completions / ZSH on Windows)
README
# zsh-ssh-agent
A bloat free utility plugin for managing `ssh-agent` in `zsh`. This plugin automatically starts and manages `ssh-agent` whenever a new ternimal session starts.
### Installation
To install `zsh-ssh-agent` using `zap`, a minimal zsh plugin manager, add the following line to your `.zshrc` file and you're good to go.
```zsh
plug 'twfksh/zsh-ssh-agent'
```
### Configuration
For seamless integration with `ssh-agent`, add the following line to `~/.ssh/config` file:
```
Host *
AddKeysToAgent yes
```
Recommended if you want all keys used by `ssh` to be added automatically.
If you have multiple SSH keys for different services (GitHub, GitLab, AWS, etc.), you can specify them explicitly in your `.ssh/config`:
```
# GitHub
Host github.com
User git
IdentityFile ~/.ssh/id_github
AddKeysToAgent yes
```
Each Host entry can have its own key. `AddKeysToAgent yes` ensures that key is automatically loaded when connecting. You can still use the script to auto-load a default set of keys for convenience.
Inspired by `ivakyb/fish_ssh_agent` that I've been using on fish shell.