-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to authenticate with gpg on ssh session with initrd gpgcard option activated #106563
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/yubikey-smartcard-challenge-mode-usable-on-remote-ssh/8936/32 |
Ok i found a weird way to get 1 - connect to remote initrd ssh
Each time you need to
Works manually to decrypt passphrase, |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/yubikey-smartcard-challenge-mode-usable-on-remote-ssh/8936/33 |
|
And to reiterate, again, |
Hum, i'm only talking about the Sorry about that, like multiple people, i'm trying, and i'm not alone. |
I marked this as stale due to inactivity. → More info |
Sorry but this is not solved Bot. |
Just faced into the similar issue while trying to create a key, and it's horrible. Ok, I'm on Here is a quick workaround that I am using to generate the damn gpg key:
|
Just throwing this out again -- when I walk up to a computer and need to do GPG/SSH stuff, I run I basically never encounter this problem anymore as the script ensures the user service is restarted instead of gpg-agent self-daemonizing. It sort of feels like there should be a way to tell gpg-agent to please kindly not, but I haven't looked into it (I'm more interested in soon putting GPG entirely behind me other than for compat) |
Describe the bug
Actually on unstable, it seems impossible to forward GPG agent to a remote ssh from a yubikey.
To Reproduce
Install Nixos from liveCD
2 - with ssh support at initrd for decrypting luks
3 - Modify local config to connect on my server with remote forwarding
Found this information for .gnupg configuration into Luksroot.nix at line 124
So after veryfing with
gpgconf --list-dirs
my socket, i configure my local.ssh/config
like that4 - Reboot and try to authenticate with my Yubikey GPG smartcard uing ssh
Failed ..
5- So i remove all the
S*
Socket on remote/crypt-ramfs/.gnupg
and after that i connect with success ...When i check on remote host, in ash using
ps -a
:**Ok, there is some problem with created socket at initialization of initrd,
but that don't explain why during boot GPG card don't appear and gpg --card-status don't work ! **
// Trying to debug by trying to run manually
gpg --card-status
1 - on remote, add log to gpg-agent, first kill gpg-agent :
2a - add this into
/crypt-ramfs/.gnupg/gpg-agent.conf
2b - add debug info to
/crypt-ramfs/.gnupg/scdaemon.conf
3 - reload
4 Reconnect with ssh and see nothing happen into log :
6 - Trying to run manually
gpg --card-status
on remoteash
and see the problemsUsing lsof and which i see that running PID for gpg / scadaemon :
which gpg-agent
returnlsof -p PID
of the current runninggpg-agent
returnMy conclusion at this time :
gpg
try to run an inexistantgpg-agent
and not the correctgpg-agent
already loaded into\crypt-ramfs\.gnupg
?Expected behavior
Decrypt my luks filesystem using my gpg smartcard by SSH with GPG remote forwarding
Notify maintainers
@marenz2569
@flokli
@colemickens
Maintainer information:
The text was updated successfully, but these errors were encountered: