R
RunPod2mo ago
Gothos

Multiple SSH keys via Edit Pod option

I understand I need to separate public keys by newlines. However pasting in SSH keys separated by newlines via Edit Pod-> Environment Variables doesn't seem to allow two people to connect simultaneously. Sorry if this has been answered elsewhere, thanks in advance!
Solution:
Either that or simply manually add the SSH keys to the authorized_keys file which is much simpler.
Jump to solution
10 Replies
digigoblin
digigoblin2mo ago
Depends on your template, some templates don't add it to the authorized_keys file correctly. Which template are you using?
Gothos
Gothos2mo ago
runpod/pytorch:2.0.1-py3.10-cuda11.8.0-devel-ubuntu22.04 On-Demand - Secure Cloud
digigoblin
digigoblin2mo ago
RunPod official templates should add it correctly, unless that template hasn't been rebuilt since the start.sh script was updated to support multiple keys.
Gothos
Gothos2mo ago
It's been shut on and off multiple times. How would a newline reflect in the Edit Pod section? It didn't really seem to show up when I copy-pasted 2 SSH keys with a newline in between
digigoblin
digigoblin2mo ago
its running old start.sh script that doesn't support multiple ssh keys
No description
digigoblin
digigoblin2mo ago
it has to do this for multiple ssh keys to work
No description
digigoblin
digigoblin2mo ago
I thought RunPod fixed this in their official templates, but apparently not: https://github.com/runpod/containers/blob/main/container-template/start.sh#L29
GitHub
containers/container-template/start.sh at main · runpod/containers
🐳 | Dockerfiles for the RunPod container images used for our official templates. - runpod/containers
Gothos
Gothos2mo ago
Sooo I have to use a custom template?
Solution
digigoblin
digigoblin2mo ago
Either that or simply manually add the SSH keys to the authorized_keys file which is much simpler.
Gothos
Gothos2mo ago
Ok will do, thanks!