1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-17 19:30:10 +00:00
ohmyzsh/plugins/ssh-agent
Marc Cornellà c494869632
ssh-agent: check for loaded id filenames first (#7521)
This change makes the plugin check if an identity is loaded by looking
first at the key filename reported by `ssh-add -l`. This fixes the use
case where ssh-keygen is not able to output the fingerprint of a key,
such as the one reported on #7516.

Now, for an identity to be passed onto ssh-add, it has to fail the
match for a loaded identity, both filename and signature.
2019-01-21 20:31:30 +01:00
..
README.md use https everywhere (#6574) 2018-08-07 20:42:01 +02:00
ssh-agent.plugin.zsh ssh-agent: check for loaded id filenames first (#7521) 2019-01-21 20:31:30 +01:00

ssh-agent plugin

This plugin starts automatically ssh-agent to set up and load whichever credentials you want for ssh connections.

To enable it, add ssh-agent to your plugins:

plugins=(... ssh-agent)

Instructions

IMPORTANT: put these settings before the line that sources oh-my-zsh

To enable agent forwarding support add the following to your zshrc file:

zstyle :omz:plugins:ssh-agent agent-forwarding on

To load multiple identities use the identities style, For example:

zstyle :omz:plugins:ssh-agent identities id_rsa id_rsa2 id_github

To set the maximum lifetime of the identities, use the lifetime style. The lifetime may be specified in seconds or as described in sshd_config(5) (see TIME FORMATS). If left unspecified, the default lifetime is forever.

zstyle :omz:plugins:ssh-agent lifetime 4h

Credits

Based on code from Joseph M. Reagle: https://www.cygwin.com/ml/cygwin/2001-06/msg00537.html

Agent-forwarding support based on ideas from Florent Thoumie and Jonas Pfenniger