如何配置 Ansible 通过 PKCS11Provider 使用基于 TPM 的 SSH 密钥

为了在 Ansible 中使用基于 TPM 的 SSH 密钥,你需要在 host_varsgroup_vars 中配置 ansible_ssh_common_args 以指向 PKCS11 提供程序库。

ansible-ssh-pkcs11.yml
ansible_user: myuser
ansible_ssh_common_args: '-o PKCS11Provider=/usr/lib/x86_64-linux-gnu/pkcs11/libtpm2_pkcs11.so -o PasswordAuthentication=no'

Check out similar posts by category: Ansible, Cryptography, Linux