R
Railwayβ€’10mo ago
yarik.03k

SSH tunneling

Hi all, I'm deploying a django project with ssh tunneling to connect to a remote database. For this I am using ssh authentication via private/public keys. How can I safely store the private ssh key in the repository to connect to the remote database? Thanks in advance πŸ˜‰
7 Replies
Percy
Percyβ€’10mo ago
Project ID: 97b19625-14e4-46b6-8fdc-357b0774d177
yarik.03k
yarik.03kβ€’10mo ago
97b19625-14e4-46b6-8fdc-357b0774d177
Brody
Brodyβ€’10mo ago
my advice would be to store them in a storage bucket like cloudflare r2 and download the key files from the bucket during build
yarik.03k
yarik.03kβ€’10mo ago
what about security? After all, the keys will be visible in the repository, and packages can probably be intercepted?
Brody
Brodyβ€’10mo ago
you might've misunderstood me, my recommendation was to not store the keys in the repository, but to store them in a private s3 based bucket storage, like cloudflare r2. you do not want to be storing your keys in your repository itself, private or otherwise
yarik.03k
yarik.03kβ€’10mo ago
I hear you. Thank you for your replyπŸ˜€
Brody
Brodyβ€’10mo ago
no problem!