imgrant / ssh-agent.fish

ssh-agent automatic startup and identities loading for fish (adapted for oh-my-fish)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ssh-agent_fish

A plugin for Oh My Fish.

MIT License Fish Shell Version Oh My Fish Framework

About

ssh-agent automatic startup for fish

Installation

Using Oh My Fish (recommended)

  1. Install Oh My Fish https://github.com/oh-my-fish/oh-my-fish
  2. Run:
    $ omf install https://github.com/imgrant/ssh-agent.fish

Manually

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.

Usage

You can customize the functionality, identities, etc., via a few universal variables.

Multiple identities

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

Lifetime

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

Alternative agent

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"

Nerd font glyphs

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

Acknowledgements

License

MIT © Ian Grant et al

About

ssh-agent automatic startup and identities loading for fish (adapted for oh-my-fish)

License:MIT License


Languages

Language:Shell 100.0%