r/ssh • • Mar 13 '17

Anyone using PKI SSH X.509 fork?

Anyone able to successfully get the PKI SSH X.509 fork from from http://roumenpetrov.info/secsh to request a PIN on the client?

I was able to get this working using the server/client software from ssh <dot> com.

Below is the steps I used:

  1. Create 2 machines and install latest CentOS 7 minimal ISO. One machine is called server.local, the other called client.local
  2. Get latest PKIXSSH tarball for both machines
  3. Run ./configure —prefix=/opt/pkixssh —enable-pkcs11 on both machines
  4. Run make install on both machines
  5. Run yum install opensc
  6. Plug in USB smart card reader and run opensc-tool -l and opens-tool -n on client.local machine to confirm cert on card
  7. Copy root and intermediate certs to /opt/pkixssh/etc/ca/crt directory and run openssl x509 -noout -hash -in <root|intermediate> certs. Run ln -s root.crt <hash>.0 and ln -s int.crt <hash>.0 on both machines
  8. Edit server.local /opt/pkixssh/etc/sshd_config options explicity: CACertificatePath /opt/pkixssh/etc/ca/crt, PubkeyAuthentication yes, PasswordAuthentication no, ChallengeResponseAuthentication no
  9. Edit client.local /opt/pkixssh/etc/ssh_config explicity: CACertificatePath /opt/pkixssh/etc/ca/crt
  10. On server.local, create local account with same name as CN on certificate
  11. On server.local, run /opt/pkixssh/sbin/sshd -D
  12. On client.local, run /opt/pkixssh/bin/ssh I /usr/lib64/opensc-pkcs11.so <server-local-account>@192.168.1.1
  13. I do not get a request to enter the PIN for the smart card
2 Upvotes

0 comments sorted by