Ansible:如何使用 TPM 存储的 SSH 密钥进行 SSH 认证
在你的 Ansible inventory 文件中,你可以指定 ansible_ssh_extra_args='-o PKCS11Provider=/usr/lib/x86_64-linux-gnu/libtpm2_pkcs11.so.1' 来使用 TPM 存储的 SSH 密钥进行 SSH 认证。
这将强制 SSH 使用 TPM PKCS#11 提供程序进行 SSH 密钥认证,允许你安全地使用存储在 TPM 中的 SSH 密钥。
inventory.ini
[servers]
server01 ansible_host=10.1.2.3 ansible_user=myuser ansible_ssh_extra_args='-o PKCS11Provider=/usr/lib/x86_64-linux-gnu/libtpm2_pkcs11.so.1'Check out similar posts by category:
Ansible
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow