From 5033a9421a11533ab71d32ceb6661c6d2b1be9bd Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 31 Aug 2023 16:29:53 +0200 Subject: [PATCH] docs: Nitrokey ssh workaround --- yodaTab/nitrokey-ssh-gpg.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/yodaTab/nitrokey-ssh-gpg.nix b/yodaTab/nitrokey-ssh-gpg.nix index c16a277..4ddbf50 100644 --- a/yodaTab/nitrokey-ssh-gpg.nix +++ b/yodaTab/nitrokey-ssh-gpg.nix @@ -36,6 +36,23 @@ #=> debug1: /home/yoda/.ssh/config line 180: Applying options for * #=> debug1: Reading configuration data /etc/ssh/ssh_config #=> debug1: Executing command: '/nix/store/8fv91097mbh5049i9rglc73dx6kjg3qk-bash-5.2-p15/bin/bash -c '/nix/store/lvsbmqy4dmlri22145hbr6799hgbnpnf-gnupg-2.4.0/bin/gpg-connect-agent --quiet updatestartuptty /bye >/dev/null 2>&1'' + # + #=> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND + #=> yoda 2752 0.0 0.0 444812 3040 ? SLsl 16:09 0:00 /nix/store/lvsbmqy4dmlri22145hbr6799hgbnpnf-gnupg-2.4.0/bin/gpg-agent --supervised --pinentry-program /nix/store/8cvidvpwnwyxixlhqfaa5jlfndh2vir5-pinentry-1.2.1-curses/bin/pinentry + + # TESTING: Do all of this in one shell! + # CREDITS: https://unix.stackexchange.com/a/250045/315162 + # + # systemctl --user stop gpg-agent + # systemctl --user stop gpg-agent.socket + # systemctl --user stop gpg-agent-ssh.socket + # eval $(gpg-agent --daemon --pinentry-program /nix/store/8cvidvpwnwyxixlhqfaa5jlfndh2vir5-pinentry-1.2.1-curses/bin/pinentry --enable-ssh-support --sh) + # echo $SSH_AUTH_SOCK + #=> /run/user/1000/gnupg/S.gpg-agent.ssh + # gpg -d ./passphrase.txt.gpg + #=> Works! + # ssh nas + #=> Works! services.udev.packages = [ pkgs.nitrokey-udev-rules ]; programs = {