R
RunPod3mo 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
Encyrption3mo 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-man3mo 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
Encyrption3mo 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-man3mo 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
Encyrption3mo ago
unfortunately, I am not aware of such a pre-built solution. Good luck!
Want results from more Discord servers?
Add your server