Yubico / yubico-piv-tool

Command line tool for the YubiKey PIV application
https://developers.yubico.com/yubico-piv-tool
BSD 2-Clause "Simplified" License
301 stars 99 forks source link

yubico-piv-tool -a status is Failed to connect to reader. #180

Closed ncaq closed 4 years ago

ncaq commented 5 years ago

I use YubiKey 5 NFC.

% ykman list
YubiKey 5 NFC [OTP+FIDO+CCID] Serial: 9074075

yubico-piv-tool is failed.

% yubico-piv-tool -a status
Failed to connect to reader.

ykman piv reset is failed.

% ykman piv reset
Usage: ykman [OPTIONS] COMMAND [ARGS]...
Try "ykman -h" for help.

Error: Failed connecting to the YubiKey.

I use Gentoo Linux.

2019-01-12T18:28:25 ncaq@karen/pts/2(0) ~
% cat /etc/os-release 
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo/Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
2019-01-12T18:30:20 ncaq@karen/pts/2(0) ~
% uname -a
Linux karen 4.14.83-gentoo #6 SMP Sat Jan 12 16:28:32 JST 2019 x86_64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz GenuineIntel GNU/Linux
2019-01-12T18:30:24 ncaq@karen/pts/2(0) ~
% ykman -v
YubiKey Manager (ykman) version: 1.0.0
Libraries:
    libykpers 1.19.0
    libusb 1.0.22
2019-01-12T18:30:29 ncaq@karen/pts/2(0) ~
% yubico-piv-tool -V
yubico-piv-tool 1.6.2

I use libu2f-host/70-u2f.rules at master · Yubico/libu2f-host

pcsc-lite display error message.

% sudo systemctl status pcscd.service
● pcscd.service - PC/SC Smart Card Daemon
   Loaded: loaded (/lib/systemd/system/pcscd.service; indirect; vendor preset: disabled)
   Active: inactive (dead) since Sat 2019-01-12 18:29:26 JST; 1min 50s ago
     Docs: man:pcscd(8)
  Process: 15409 ExecStart=/usr/sbin/pcscd --foreground --auto-exit (code=exited, status=0/SUCCESS)
 Main PID: 15409 (code=exited, status=0/SUCCESS)

 1月 12 18:27:42 karen systemd[1]: Started PC/SC Smart Card Daemon.
 1月 12 18:27:42 karen pcscd[15409]: 00000000 /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libusb.c:141:HPReadBundleValues() Cannot open PC/SC drivers directory: /usr/lib64/readers/usb
 1月 12 18:27:42 karen pcscd[15409]: 00000014 /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libusb.c:142:HPReadBundleValues() Disabling USB support for pcscd.
klali commented 5 years ago

It would seem that your problems are primarily with pcscd, not with yubico-piv-tool or ykman.

I'm not familiar with that failure mode of pcscd, it hints at lacking PC/SC drivers, could it be that your pcscd hasn't pulled in ccid/libccid?

hongkongkiwi commented 5 years ago

Similar problem on OSX, using latest version (1.6.2) I can't connect to my Yubikey 5 nano using yubico-piv-tool :-( reader not found. Works fine with ykman

avtobiff commented 5 years ago

Have you tried enabling the 'set-visible-api' flag?

See #215 , I had programmed my yubikey to be less sensitive to touch for OTP.

qpernil commented 4 years ago

yubico-piv-tool 2.0.0 is out and contains major upgrade to ykcs11. Please try that version.

I'm closing this issue, please re-open if the problem persists.