File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ echo "Adding new identities."
2727# Otherwise the server you connect to can use the SSH keys
2828# as if it was your local machine!
2929
30+ # Support for TPM-based keys
3031LIBTPM2_PKCS11=" /usr/lib/x86_64-linux-gnu/libtpm2_pkcs11.so.1"
3132if [ -f " ${LIBTPM2_PKCS11} " ]; then
3233 set +e
@@ -39,6 +40,15 @@ if [ -f "${HOME}/.ssh/id_rsa" ]; then
3940 ssh-add " ${HOME} /.ssh/id_rsa"
4041fi
4142
43+ # Support for smart cards. These may require a PIN, which is why this is after id_rsa.
44+ # https://www.linux.fi/wiki/HST#Ssh_2
45+ OPENSC_PKCS11=" /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so"
46+ if [ -f " ${OPENSC_PKCS11} " ]; then
47+ set +e
48+ ssh-add -s " ${OPENSC_PKCS11} "
49+ set -e
50+ fi
51+
4252. " ${CONF_SCRIPT} "
4353
4454echo " Configured identities:"
You can’t perform that action at this time.
0 commit comments