Skip to content

Commit eb78456

Browse files
committed
Fix libtpm2_pkcs11 paths
1 parent e02f371 commit eb78456

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ssh/setup_agent.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@ echo "Adding new identities."
2929
# as if it was your local machine!
3030

3131
# Support for TPM-based keys
32-
LIBTPM2_PKCS11="/usr/lib/x86_64-linux-gnu/libtpm2_pkcs11.so.1"
32+
# The path changed with Kubuntu 25.04.
33+
LIBTPM2_PKCS11="/usr/lib/x86_64-linux-gnu/pkcs11/libtpm2_pkcs11.so"
34+
LIBTPM2_PKCS11_OLD="/usr/lib/x86_64-linux-gnu/libtpm2_pkcs11.so.1"
3335
if [ -f "${LIBTPM2_PKCS11}" ]; then
3436
set +e
3537
ssh-add -s "${LIBTPM2_PKCS11}"
3638
set -e
39+
elif [ -f "${LIBTPM2_PKCS11_OLD}" ]; then
40+
set +e
41+
ssh-add -s "${LIBTPM2_PKCS11_OLD}"
42+
set -e
3743
fi
3844

3945
# The id_rsa is only used for specific purposes

0 commit comments

Comments
 (0)