Nitrokey Pro installation under RHEL7/CentOS7

Hi all,

Here’s my TL;DR version of how to get the Nitrokey Pro working under RHEL7/CentOS 7.

  1. Install gnupg2-smime, pscs-lite, pcsc-lite-ccid and libqtxdg-qt5
sudo yum install gnupg2-smime pscs-lite pcsc-lite-ccid libqtxdg-qt5
  1. edit /lib64/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist and add the lines as described at nitrokey.com/documentation/ … o&os:linux

  2. Download the nitrokey-app RPM and (unfortunately) force-install it

sudo rpm -ivh --force nitrokey-app-0.2-Linux.rpm
  1. Either reload udev rules or restart machine.
sudo udevadm control --reload
  1. Start the Nitrokey App either from the command line or (I use GNOME3) from the Accessories menu

Done. Your Nitrokey Pro should now show up and the app should be able to configure it.

NOTE: When you do

sudo gpg --card-status

you might get a “Card not present” error message the first time. Just repeat the command again and all should be fine.

GNOME users (like me): open gnome-session.properties and disable gpg-agent and ssh-agent. This change will allow you user access to the card with gpg. So no sudo needed.

Now to use your Nitrokey for ssh logins on remote machines, use these steps:

  1. Create ~/.gnupg/gpg-agent.conf and add the following line to it:
enable-ssh-support
  1. Create or edit your ~/.bashrc and add these lines:

envfile="$HOME/.gnupg/gpg-agent.env" if -e "$envfile" ]] && kill -0 $(grep SSH_AGENT_PID "$envfile" | cut -d= -f 2) 2>/dev/null; then eval "$(cat "$envfile")" else eval "$(gpg-agent --daemon --write-env-file "$envfile")" fi export SSH_AUTH_SOCK

  1. Open a new terminal (or logout and login to your session) and check with
$ ssh-add -l

that your card is recognized and the public key is available. With

$ ssh-add -L

you get the public key that you can add to the .ssh/authorized_keys file on your target machines.

Hope this helps.

Disclaimer: I work at Red Hat and will now try to get the ccid rules in our repos and will look for someone to help me get the nitrokey app in either EPEL or or other RPM repos.

Jan Wildeboer

1 Like

Great explanation. Thanks.

not work for me:

Fehler: Fehlgeschlagende Abhängigkeiten:
libappindicator.so.1()(64bit) wird benötigt von nitrokey-app-0.6.1-1.x86_64
libstdc++.so.6(CXXABI_1.3.9)(64bit) wird benötigt von nitrokey-app-0.6.1-1.x86_64
libstdc++.so.6(GLIBCXX_3.4.21)(64bit) wird benötigt von nitrokey-app-0.6.1-1.x86_64

thank you for help

centos7

Having the same problem! But according to package manager, libstdc++.so.6 is installed…

Can anyone help ? Centos 7 User cannot use the NitroKeyApp (and old Downloadversion?)

Hi!
Sorry for late reply.

I have not used Centos earlier but I will try to help anyway. Do I understand correctly, that older versions of Nitrokey App are working (v0.2-v0.5)?

As for error message, I guess updating the C++ compiler (possibly installing GCC 5.0+) should help. Also installing a package with libappindicator will be needed.

I have checked EPEL repository and downloaded libappindicator there, but I still have not found any way to update glibc libraries or compiler. I see Fedora has all updates (it has even GCC 7.0, while we need 5.0), so it should be here too.
I am afraid you will have to ask on some CentOS forum how to deal with this issue - that is updating these libraries.

Hello,

for anyone landing here: there is a repo by Igor Gnatenko which can be used for installing the Nitrokey App on RedHat and CentOS (https://www.nitrokey.com/download/redhat). This should solve the issues above.

Kind regards
Alex