Hi,
I need to access my Netlify SSH deploy key private key from my build environment. Where is the SSH private key stored in the machine?
Thanks.
Hi,
I need to access my Netlify SSH deploy key private key from my build environment. Where is the SSH private key stored in the machine?
Thanks.
There’s no SSH, probably. Why do you need one if I may ask?
I need an SSH private key in my application to connect to a server. The key is on my machine and it’s .gitignore-d and I don’t want to commit it.
Since Netlify has a concept of SSH deploy keys to access private git repos registered as submodules, I figured the key would be in the build container and I could use this concept of deploy keys to provide myself with an SSH key for my own purposes.
Oh those ones. Are you looking for this: Repository permissions and linking | Netlify Docs?
I am familiar with that page. I am looking for the corresponding private key in the build environment to the deploy keys I create
I’m not entirely sure this is possible… and to be honest I don’t quite understand a use case for it either.
As the page mentions, the private key is stored with Netlify and it’s probably hidden and only the public one is visible to you.
I mean, it is used to pull the submodules at build time. That means it’s probably in the build environment somewhere.
As far as the use case goes: as I said, the software can connect via SSH to a remote server. I can use another service instead of Netlify if there’s no way for me to have an SSH private key in Netlify safely.
From my understanding, you can only see the public key, not the private one sadly.
I found the key by the way, it’s in /opt/build/deploykey
It’s not accessible unfortunately as it’s owned by root with rw permissions for its owner only, while the Netlify build process is done by user buildbot (and there’s no sudo)
Thanks for sharing this @Valerio_Versace! People like you help make Netlify Community great
Hi, @Valerio_Versace. I think the missing information is this:
Once we understand the goal, we will be able to better answer this question.