ssh-crypt icon indicating copy to clipboard operation
ssh-crypt copied to clipboard

Integrated with keyring or ansible-vault?

Open gzm55 opened this issue 11 months ago • 2 comments

is it possible to use ssh-crypt as backends of keyring and ansible-vault, etc, like sageciher?

gzm55 avatar Dec 11 '24 14:12 gzm55

Not sure about keyring, But you can use ssh-crypt like a "password manager" to safely store your ansible vault password.

  1. encrypt your current ansible vault password using ssh-crypt --encrypt --key <my-ssh-key-identifier> --string <plaintext-ansible-password>
  2. create an executable decryption script named "~/vault-pass.sh" like this:
#!/bin/bash
ssh-crypt --decrypt --key <my-ssh-key-identifier> --string '<ENCRYPTED-ansible-password>'
  1. Tell ansible vault to use the decryption script when neededexport ANSIBLE_VAULT_PASSWORD_FILE=~/vault-pass.sh

DonEstefan avatar Jun 17 '25 14:06 DonEstefan

ok, thanks

gzm55 avatar Jun 17 '25 16:06 gzm55