A plugin for Oh My Fish.
ssh-agent automatic startup for fish
- Install Oh My Fish https://github.com/oh-my-fish/oh-my-fish
- Run:
$ omf install https://github.com/imgrant/ssh-agent.fish
Copy the __ssh_agent__*.fish
files in the functions directory into your .config/fish/functions/
directory.
Copy-paste the contents of the init.fish
into your .config/fish/config.fish
file.
You can customize the functionality, identities, etc., via a few universal variables.
Unless otherwise configured, only the default identity (e.g. id_rsa
) is loaded.
You can load specific, multiple identities with the __ssh_agent__identities
variable, for example:
$ set -U __ssh_agent__identities id_rsa id_ed25519
Identities normally stay in memory forever.
You can adjust the maximum lifetime of the identities with the __ssh_agent__lifetime
variable, for example:
$ set -U __ssh_agent__lifetime 4h
By default, ssh-agent_fish uses ssh-agent
as the actual SSH agent. To use a different command instead, set the __ssh_agent__agent_command
variable. To use ssh-agent-wsl
, which is an excellent way to integrate fish
inside the Windows Subsytem for Linux with an SSH agent in Windows, for example:
$ set -U __ssh_agent__agent_command "/c/Program Files/ssh-agent-wsl/ssh-agent-wsl"
If you're using a font with extended glyphs, such as from the Nerd Font project, you can set the __ssh_agent__use_nerd_font
variable to add some little icons to the information messages that are printed when the plugin initialises:
$ set -U __ssh_agent__use_nerd_font yes
- fisherman ssh-agent plugin
- oh-my-zsh ssh-agent plugin authors
- Joseph M. Reagle