Replies: 23 comments 18 replies
|
Oh this is interesting. It's definitely too soon because age is not even stable yet, but I want to think about this when thinking about the agent strategy. I didn't know the ssh-agent protocol was so extensible. If it's a sane protocol we might even adopt it as the one age agent protocol. Might as well. |
|
Relevant post on the mailing list: https://groups.google.com/d/msg/age-dev/Xe6zW4haGx8/m_jYh7YTAgAJ |
|
ssh-agent support would also make it unnecessary to use something like |
|
Is there any plan to look at this before 1.0 release? |
|
This would also be helpful in the case someone encrypts a message to a GitHub user's SSH key. In my case I use a smart card with GPG for my SSH keys, so this ssh-agent support would make this usable in the first-place for my use-case. Also this means we can update the |
|
Note that since this is a non-standard ssh-agent extension, gpg-agent does not support it, so this does not unlock the capability of using keys on YubiKeys through it. This is a very interesting experiment, but I think we'll focus on native support for YubiKeys (both PIV and maybe even FIDO2 in symmetric mode) and on a dedicated agent (probably https://github.com/FiloSottile/yubikey-agent) which lets us support native age keys. |
|
I'm also interested in this feature. I keep my SSH keys in a keepassxc database, so I currently cannot use them with age. |
|
@FiloSottile Now that Age is released in a stable version, are there any thoughts about making it possible to decrypt using ssh files on your yubikey? |
|
Any updates or new thoughts regarding agent support? |
|
I don't know anything about Go and too little about SSH/encryption, but this guy https://github.com/leighmcculloch/sshcrypt has a working solution that does this - which links to this repo :-D Maybe you can exchange some code? I'm using his version and it's pretty damn nice to not have to worry about db credentials and such hanging out in scripts in plaintext. |
|
As 1password now provides an ssh-agent, I'd love to see support for ssh-agent in age. |
|
I can only add my name to this one. I have 3 tokens of different vendors and all exposed via Putty CAC via OpenSC. I currently do ugly scripting to mount my encrypted partitions and files with the decryption of my passphrase via pkcs11-tool. I am craving to get something usable directly like this project!! |
|
Also interested in this one ! Any updates ? |
|
ssh-agent for age: https://github.com/IxDay/janus |
|
I just ran into another situation where this would be useful - headless Linux boxes still don't have secure Git credential storage by default, I could wire something up with age but I'd like to be able to use my SSH keys in my agent to unlock it. |
|
@42wim why do you need to extend the agent for this to work? If age works with standard keys, wouldn't it also work with standard SSH keys from an agent? |
|
I have just published a proof-of-concept agent for age. This one is written in Bash with password managers like passage in mind: dbohdan/stone-agent. It comes from the realization you only need a shell and netcat or socat to listen and respond on a Unix domain socket like "real" agents. |
|
As SOPS now added support for SSH Keys in age encryption it would be great to get SSH Agent support for age which then could be added to SOPS. This would solve A LOT of security concerns about having to expose private keys on remote machines. |
|
i also use age with ssh-keys in sops and now get prompted all the time for the password to decrypt my ssh key even if i loaded the key with ssh-agent. please add support for ssh-keys already loaded in ssh-agent |
|
I think the issue a lot of people are missing is that the SSH agent never exposes the private key by design, I'll add my voice to the others saying the same thing. It only proves it has the private key to something else, so when you connect to a remote server the server basically says "prove you have the private key by signing this string 'blahblah". and the agent signs it using the private key and returns it, thus proving it has the private key. if the agent exposed the private key that'd be super insecure for agent forwarding, a nefarious actor could script stripping the private keys out of an agent when a person logs into a server. |
|
Slightly irrelevant for pure ssh-agent users, but is useful for those who use gpg-agent for ssh I have implemented a plugin that only uses gpg-agent for encryption and decryption tasks: https://github.com/CertainLach/age-plugin-gpg/ It is however does not abuse the standards, and uses the encryption, and not the authentication keygrip that is used by ssh-agent. It is not perfect, and is not tested much, but I am successfully using it for some time. |
|
ssh-agent support for age would be a significant workflow improvement — for users who already manage SSH keys via agent, adding age keys to a separate system creates friction. Current state: age supports SSH keys ( What ssh-agent support would enable: # Ideal: decrypt without touching key files
age -d -o plaintext.txt --agent encrypted.age
# age queries ssh-agent for the private key, no disk access neededThe security tradeoff:
Implementation approach (RFC 4252 extension):
The Is there appetite for implementing this as a plugin vs. core feature? The plugin route avoids adding ssh-agent dependency to age core. |
|
For anyone still landing here: I built age-plugin-sshagent — a standard age plugin (identity-v1) that gets decryption working with a stock ssh-agent, within the constraint discussed above that the agent can only sign. How it works: at keygen the agent signs a fixed, domain-separated challenge; the deterministic (RFC 8032) Ed25519 signature seeds HKDF, yielding a native X25519 age identity. Decryption just re-derives it from the agent on demand. Properties:
Honest caveats, since this is the signature-derived-key approach Filippo has (rightly) declined to put upstream: ssh-ed25519 only (sk-*/RSA signatures aren't deterministic), and anyone who can ask your agent for a signature — including remote hosts via agent forwarding — can derive the decryption key. The README documents the full security model. |
Uh oh!
There was an error while loading. Please reload this page.
I've made a POC for ssh agent support by creating a ssh-agent which uses the ssh-agent extension mechanism. (this way we can keep our keys secure on our devices)
Is this something you would want to support (I can make a PR) or is this out of scope?
All reactions