Discover the winners & finalists of the 2022 Dataiku Frontrunner Awards!READ THEIR USE CASES

use user specific ssh keys in shell recipes

clayms
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
AlexT
Dataiker

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 - https://doc.dataiku.com/dss/latest/security/user-secrets.html#python 

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

https://community.dataiku.com/t5/Using-Dataiku/Usage-of-Shell-Recipe/td-p/13955

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