use user specific ssh keys in shell recipes

Level 3
use user specific ssh keys in shell recipes

How can I use user specific ssh private keys in a shell recipe?

How can I import user secrets into a shell recipe?

Operating system used: centos

0 Kudos
1 Reply

Hi @clayms ,

1) Technically, yes, if the dss user or the impersonated user has permission to read the ssh key of other users /home/username/.ssh you can retrieve and use it in a shell recipe e.g ssh -i /path/to/name-public-key 

2) No directly with bash,  you can use python code to retrieve user secrets - 

You could try and execute python from your shell recipe  see example :

In the general, we recommend using Python recipes instead of shell recipes if possible. I you do need to make shell calls you can subprocess or os packages.

0 Kudos