admin管理员组文章数量:1124646
I switched to keeping all my SSH private and public key pairs in 1Password, relying on 1Password SSH Agent to provide the key in time of authentication to SSH remote servers and/or GitHub with a configuration like:
On Mac:
Host github
User git
HostName github
IdentityAgent ~/Library/Group\ Containers/2BUA8C4S2C.1password/t/agent.sock
Host *
IdentityAgent ~/Library/Group\ Containers/2BUA8C4S2C.1password/t/agent.sock
On Linux
Host github
User git
HostName github
IdentityAgent ~/.1password/agent.sock
Host *
IdentityAgent ~/.1password/agent.sock
I have (had) the issue, that suddenly authentication from/to existing/unchanged systems was not working anymore. ssh -vvv
revealed, that the private key fitting for a remote system was not found/not picked, although it was listed in ssh-add -l
.
I switched to keeping all my SSH private and public key pairs in 1Password, relying on 1Password SSH Agent to provide the key in time of authentication to SSH remote servers and/or GitHub with a configuration like:
On Mac:
Host github.com
User git
HostName github.com
IdentityAgent ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
Host *
IdentityAgent ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
On Linux
Host github.com
User git
HostName github.com
IdentityAgent ~/.1password/agent.sock
Host *
IdentityAgent ~/.1password/agent.sock
I have (had) the issue, that suddenly authentication from/to existing/unchanged systems was not working anymore. ssh -vvv
revealed, that the private key fitting for a remote system was not found/not picked, although it was listed in ssh-add -l
.
1 Answer
Reset to default 0Digging a bit deeper I found out, that some SSH servers limit the number of private keys they accept for checking ... e.g. to 6. As I was adding another key pair recently, although not yet in use and for a non-SSH use case, I figured, that this could be the cause of the problem.
As I did not (yet) find out how to pin-point key pairs for certain remote systems with 1Password, I reverted to limiting the keys exposed by adapting file ~/.config/1Password/ssh/agent.toml
to something like:
[[ssh-keys]]
vault = "Private"
item = "awsec2"
[[ssh-keys]]
vault = "Private"
item = "azvm"
[[ssh-keys]]
vault = "Private"
item = "github"
[[ssh-keys]]
vault = "Private"
item = "homelinux"
本文标签:
版权声明:本文标题:git - SSH private key not found when using 1Password SSH Agent to authenticate to remote host or GitHub - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736646247a1946113.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论