R
RunPod5mo ago
pac-man

Environment variables in direct SSH

Is there a way to access environment variables defined in the web app in an SSH connection over exposed TCP port?
5 Replies
Encyrption
Encyrption5mo ago
Problem is each time a user logs in via SSH they get a new enviorment. So you wouldn't be looking at the environment with the details you want.
pac-man
pac-manOP5mo ago
Yeah, but maybe they get saved somewhere on the pod? As a workaround I was thinking about adding an export of the vars to .bashrc in the startup script, but it seems to be a dirty hack
Encyrption
Encyrption5mo ago
Are you using your own image or someone else's? If you have access to modify your code you could have it call a start.sh script on startup and from there you could do whatever you wanted with the ENV variables.
pac-man
pac-manOP5mo ago
I'm using my own image, so I'm free to do that but was wondering if there already is a built-in solution for that. Anyway, thanks for your help!
Encyrption
Encyrption5mo ago
unfortunately, I am not aware of such a pre-built solution. Good luck!
Want results from more Discord servers?
Add your server