net-ssh / net-ssh

Pure Ruby implementation of an SSH (protocol 2) client
http://net-ssh.github.io/net-ssh
MIT License
970 stars 441 forks source link

Key manager can load public key as IdentityFile #942

Open kpumuk opened 3 months ago

kpumuk commented 3 months ago

This PR allows setting public keys as IdentityFile in SSH config.

If an SSH client supports setting public keys as IdentityFile, you can use that to match hosts to a specific key in 1Password.

This enables deployments with Capistrano or Kamal using SSH keys stored in 1Password when also pinning the public key to a specific host.

Host deploy
  IdentitiesOnly yes
  IdentityFile ~/.ssh/kamal.pub
  IdentityAgent ~/.1password/agent.sock