Help with connecting to pods with SSH connection
Hi everyone,
I've generated my ssh keys following this guideilne: https://docs.runpod.io/pods/configuration/use-ssh and I've entered the output into my sshkeys fo the runpod .
But when I try to connect, it says [numbers@ssh.runpod.io: Permission denied (publickey).].
I think I've spent $4 trying to figure it out now.
My expose HTTP ports is 8888 and my expose tcp port is 22.
I don't know what this means, I just saw someone else entering it.
Also, my ideal setup would be i can ssh into it and have it run while I'm not connecting to it since I need to train some ML models.
Also I would love if I can connect it with VSCode and also maybe get an x display server so that I can see the output visually.
Runpod Documentation
Connect to a Pod with SSH - Runpod Documentation
Connect to your Pods with SSH to manage long-running processes and critical tasks.

33 Replies
is there a way for us to pay for premium support that can answer questions quickly?
Unknown User•4mo ago
Message Not Public
Sign In & Join Server To View
I did the first one, I might have configured it wrongly though with the exposed HTTPS or TCP ports
Unknown User•4mo ago
Message Not Public
Sign In & Join Server To View
I see
I'll try the official templates
I tried the official template that connects to the vscode, I think it might have to do with my ssh key not working.
Once I generate the ssh key, do I need to export it or do anything on my local machine like SSH_KEY="[the generated key]"?
you should generate ssh keys first on your device, then on Runpod settings page paste public key then deploy pod
Yes I did that with this command:
'ssh-keygen -t ed25519 -C "YOUR_EMAIL@DOMAIN.COM"' and replaced it with my email
took the output from:
'cat ~/.ssh/id_ed25519.pub'
and pasted that output on the runpod setting
does the email need to be capital letter by any chance?
hey I've just realized where I went wrong. i saw my runpod template and it still had the old "YOUR_EMAIL@DOMAIN.COM" 😅
I guess if this is too common of a problem that you guys are seeing our customers have and you have to spend time debugging on, one possible improvement would be in "https://docs.runpod.io/pods/configuration/use-ssh", you have the customer input their email on the form, or automatically autopopulate from their sign-in with runpod with their email
Runpod Documentation
Welcome to Runpod - Runpod Documentation
Explore our guides and examples to deploy your AI/ML application on Runpod.

How do I put this issue as solved?
Also what exposed HTTPS and TCP ports would you recommed? I don't really know much about them and just copy pasted some
I have problem connecting it to my vscode though
for vs code you need tcp 22


This is what I set the runpod to be before starting it but fr some reason I couldnt connect ot it

I could go along with the runpod guide to connect to vscode but on the edit custom ssh config file, I put in the file structure on the first image, andit gave me the second picture
remove bash command from container start
ohh i see
I've had to include when I used my custom template so that I could connect to it via web terminal.
Is there anything I should add to my custom dockerfile so that I dont need to do that?
https://github.com/runpod/containers here how our docker are build
GitHub
GitHub - runpod/containers: 🐳 | Dockerfiles for the RunPod cont...
🐳 | Dockerfiles for the RunPod container images used for our official templates. - runpod/containers
I would just like to say I really appreciate the prompt help/support
I'll try it out
I guess the format I should learn and copy should be around official-templates, container-template and scripts right?
not that much but it's good start point
Thanks so much
hmm after I removed the bash -c 'sleep 1h' on the container start command, the option to connect to ssh via exposed TCP is now not there.
I'm pretty sre the container image is the officialone, but I'll try a different runpod official templa

what do you see in logs
ye something is no right. Are you sure you removed container start command
Yes

Should I try a different container image maybe?
I've tried using runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04 and it won't work, i'll try to use the runpod vscode server template
I've done the same with th runpod vscode server template and it shows the same error message
I think it has something to do with my vscode ssh settings, or a template config that I have in runpod
I can connect to it via ssh and via ssh via exposed tcp ports if I use my local terminal, but I wasn't able to do it on vscode
Also is it possible in the future for these forums to be private? Since someone can access someone else's server by looking and going through the copy-pasted ip
I think it's cause you removed storage and only left 5 GB
I see, I'll try 20 GB
same thing happened I couldn't connect to it whn I use th runpod vscode server template and I use 50GB

I think it is a vscode issue
https://www.runpod.io/blog/vs-code-server-on-runpod
This seem like anoter way to do that, but it was 2023, and used remote tunnels
VS Code Server | Local-Quality Development Experience | Runpod Blog
Use the VS Code Server template on Runpod to connect your local VS Code editor to a GPU-powered development pod, offering a seamless remote dev experience with full VS Code functionality.
nope it looks like it ask you to pick file
The usual default is different, but I was assuming I had to point the vscode to the ssh folder from the ssh that I generated,
Is this a wrong assumption?
The ssh that was generated was from the runpod documentation:
'To retrieve your public SSH key, run this command:
Copy
cat ~/.ssh/id_ed25519.pub'