by jacobvosmaer · 8y ago · 0 comments
# Generate key
$ gpg2 --card-edit
> admin
> passwd
change both user and admin PIN to a secure password (can be the same, it's called PIN but you can just use a regular alphanumeric password)
> key-attr
choose RSA, 4096 (or whatever you consider sufficient)
> generate
# Add this to your .bash_profile (use GPG agent instead of SSH)
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
# Export your SSH public key
$ ssh-add -LAssuming Linux or OsX where your distribution has an opensc that already supports your device, ssh is only about 3 incantations of magic:
https://nilsschneider.net/2013/06/20/epass2003-quickstart.ht...
But there is no safe way of getting away from having 1 pin.
PKCS11Provider=/usr/lib/ssh-keychain.dylib
https://support.apple.com/en-us/HT208372If you don't want to have to learn gpg (because why should you?) the master/sub keys, PINs, keyservers, and all that can be dumped, just like ssh-keygen is able to create keys without passphrases - not exactly recommended, but still better than the alternative.
If that's better... I dunno :-)