Skip to content

Instantly share code, notes, and snippets.

@MorbosVermin
Last active August 29, 2015 14:06
Show Gist options
  • Save MorbosVermin/354ede3e733d772cdbce to your computer and use it in GitHub Desktop.
Save MorbosVermin/354ede3e733d772cdbce to your computer and use it in GitHub Desktop.
#!/bin/bash
# grab the public keys on a PIV/CAC and generate ssh-rsa which can be appended to the .ssh/authorized_keys(2) file for pubkeyauth.
# your PKCS#11 driver may vary (we also used cackey).
#LIB=/usr/lib/libcackey.so
LIB=/usr/lib/pkcs11/libcoolkeypkcs11.so
ssh-keygen -D ${LIB}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment