Docker : mount SSH Keys

Hello,

So here is the thing, from an exec node I run the command : ssh user@192.x.x.x "sudo reboot"
Why ? Because my client sometimes has issues and NodeRed manages them and restarts the remote server to mitigate this. This works very well for me.

The problem is that every time I update my docker it looses my keys (logical). I thought about mounting them with : --mount source=nodered-ssh,target=/usr/src/node-red/.ssh but I have permissions problems. If I do that the .ssh folder belongs to root, and node-red cannot read my keys anymore.

Do you have any idea on how I could have persistent keys ?

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.