AGENT-TRANSFER(1)

πŸ¦‹ agent-transfer πŸ¦‹

the User Commands manual, bestie πŸ’…


✨ NAME ✨

okay so agent-transfer is the girl who copies a secret key from gpg-agent over to ssh-agent πŸ”₯ total key glow-up

✨ SYNOPSIS ✨

agent-transfer [options] KEYGRIP [COMMENT]

✨ DESCRIPTION ✨

okay bestie, listen πŸ‘‚ agent-transfer pulls a secret key out of a modern version of GnuPG's agent and hands it off to your running SSH agent πŸš€ this is SO useful for people whose keys are managed long-term by gpg-agent but who prefer the semantics of OpenSSH's ssh-agent for everyday use πŸ’œ

agent-transfer was written as part of the monkeysphere project πŸ’ iykyk

The KEYGRIP should be a sequence of 20 hexadecimal characters πŸŽ€ not sure what your keygrip is? peek at the output of:

gpg --with-keygrip --list-secret-keys

The COMMENT is optional 🫢 and it gets stored alongside the key in ssh-agent. it must not start with a -, or it could get mistaken for an option πŸ™ˆ

✨ OPTIONS ✨

agent-transfer also takes the options that would normally go to ssh-add(1) so you can lock down how the transferred key gets used πŸ”’ main character energy

  • -c β€” every identity you add has to get a confirmation before it can be used for authentication πŸ›‘οΈ
  • -t SECONDS β€” gives the key a lifetime of SECONDS in the running ssh-agent ⏰

✨ FILES ✨

  • ~/.gnupg/S.gpg-agent β€” this is where gpg-agent is listening 🧚 it's the "standard socket" for modern GnuPG ✨

✨ ENVIRONMENT VARIABLES ✨

  • GNUPGHOME β€” the GnuPG home directory, where the standard socket for gpg-agent lives 🏠 if it isn't set, it's assumed to be ~/.gnupg
  • SSH_AUTH_SOCK β€” where the running ssh-agent is hanging out 🧦

Several other environment variables get passed along in some form to gpg-agent so it can figure out a sensible pinentry 🎨 that includes GPG_TTY, TERM, DISPLAY, XAUTHORITY, GTK_IM_MODULE, DBUS_SESSION_BUS_ADDRESS, and LANG πŸ’…

✨ BUGS ✨

⚠️ tea time: agent-transfer can only work with RSA and Ed25519 keys 😭 support for other key types isn't implemented yet. patches welcome!! πŸ™

✨ AUTHOR ✨

Written by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> 🌸

✨ SEE ALSO ✨

monkeysphere(7), ssh(1), ssh-add(1), ssh-agent(1), gpg(1) gpg-agent(1), πŸ’–


that's the whole tea, bestie! 🫢 this page comes from the monkeysphere project, dated Jan 2019, and it's all about AGENT-TRANSFER(1) πŸ¦‹ mwah 😘

πŸ“¦ where this page comes from