Instructions to setup nitrokey to use with SSH with Ubuntu 17.10

Hey,

yeah, well, that was my fault. In trying to make the instructions as generic as possible :roll_eyes:

Your .bashrc should read:

if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
  export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi

This is probably ‘/run/user/1000/gnupg/S.gpg-agent.ssh’ for your system/user. If you put this in Ubuntu 16.04 it won’t work though, as the command ‘gpgconf --list-dirs agent-ssh-socket’ gives out multiple folders instead of one. I tried to work around and thought the home-folder would work as well (as it was the standard in the past). Well, it isn’t. Sorry for the confusing and inconvenience! :blush:

I will try to find another (real) generic way instead. But you should be fine for now :thinking:

Please let me know if it works (remember to open a new bash after changing .bashrc or just look at ‘echo $SSH_AUTH_SOCK’ if it is fine).

2 Likes