ohmyzsh: ssh-agent plugin doesn't load multiple identities

Hi, I’m using ssh-add plugin https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/ssh-agent. In the README.md, it says this:

To load multiple identities use the identities style, For example:
zstyle :omz:plugins:ssh-agent identities id_rsa id_rsa2 id_github

I already added this in my ~/.zshrc before the line that sources oh-my-zsh like this:

zstyle :omz:plugins:ssh-agent identities id_rsa prd-key stg-key
source $ZSH/oh-my-zsh.sh

My .ssh/ folder is having these keys:

 ll .ssh
-rw-------@ 1 122462    1.6K Feb 27 11:20 id_rsa
-rw-------@ 1 122462    1.7K Mar 28 14:54 prd-key
-rw-------@ 1 122462    1.6K Feb 27 11:26 stg-key

But when I executed ssh-add -l, only id-rsa was shown instead of all 3 keys:

ssh-add -l
2048 .ssh/id_rsa (RSA)

I’m expecting something like this:

ssh-add -l
2048 .ssh/id_rsa (RSA)
2048 .ssh/prd-key (RSA)
2048 .ssh/stg-key (RSA)

How can I solve this ? Did I miss anything ?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@riccardoerra I submitted #7174 to fix your use case.