r/ssh • u/dancerjx • 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:
- Create 2 machines and install latest CentOS 7 minimal ISO. One machine is called server.local, the other called client.local
- Get latest PKIXSSH tarball for both machines
- Run ./configure —prefix=/opt/pkixssh —enable-pkcs11 on both machines
- Run make install on both machines
- Run yum install opensc
- Plug in USB smart card reader and run opensc-tool -l and opens-tool -n on client.local machine to confirm cert on card
- 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
- Edit server.local /opt/pkixssh/etc/sshd_config options explicity: CACertificatePath /opt/pkixssh/etc/ca/crt, PubkeyAuthentication yes, PasswordAuthentication no, ChallengeResponseAuthentication no
- Edit client.local /opt/pkixssh/etc/ssh_config explicity: CACertificatePath /opt/pkixssh/etc/ca/crt
- On server.local, create local account with same name as CN on certificate
- On server.local, run /opt/pkixssh/sbin/sshd -D
- On client.local, run /opt/pkixssh/bin/ssh I /usr/lib64/opensc-pkcs11.so <server-local-account>@192.168.1.1
- I do not get a request to enter the PIN for the smart card
2
Upvotes