funtoo / keychain

keychain ssh-agent front-end
http://www.funtoo.org
GNU General Public License v2.0
750 stars 105 forks source link

Key passphrase is not persisted #73

Closed niij closed 7 years ago

niij commented 7 years ago

I am trying to cache the password for an SSH key, but I am still prompted for passphrase after initially entering it upon loading my first shell. I am using an EdDSA key. Ubuntu 16.04 & Keychain 2.8.1

In my ~/.zshrc I have: keychain --eval --quiet --nogui id_ed25519 > /dev/null

Running keychain -l gives me:

/usr/bin/keychain: 1537: [: SHA256:+SSHKEYPRIVATEINFORMATION: unexpected operator
SHA256:+SAMEOUTPUTOFSSHKEYPRIVATEINFORMATION
/usr/bin/keychain: 1537: [: end: unexpected operator
end

Thanks for your help Daniel!

danielrobbins commented 7 years ago

This issue has been imported into the Funtoo Linux bug tracker. This helps us to ensure that your bug is prioritized and gets the attention it deserves. You are welcome to create a Funtoo account and participate in the Funtoo Linux workflow or follow-up in the GitHub issue (comments are not currently synchronized.) Follow the action here: https://bugs.funtoo.org/browse/FL-3493

niij commented 7 years ago

I am still experiencing issues with the Keychain program, but I got my SSH keychain to work successfully using the ssh-agent. For anyone else having issues getting your keychain to work, follow the instructions here.

grtcdr commented 1 year ago

Hi Funtoo project maintainers,

I'm also experiencing the same issue (on Arch Linux, keychain version 2.8.5) but in my case, keychain -l correctly returns both GPG and SSH keys. After entering my password and logging in via the TTY, I'm prompted to enter the passphrases of both keys, however only the SSH passphrase is never cached.

eval `keychain --quiet --absolute --dir "$XDG_RUNTIME_DIR"/keychain --eval --agents ssh,gpg <ssh-key> <gpg-fingerprint>`

Thank you for this immensely helpful project!

EDIT: It turns out that I hadn't disabled the ssh-agent user service (through systemd) which meant it was taking control. Disabling that (and of course gpg-agent) is the critical piece to get keychain working again.