R
Runpod4mo ago
ZoellaB

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.
From An unknown user
From An unknown user
33 Replies
ZoellaB
ZoellaBOP4mo ago
is there a way for us to pay for premium support that can answer questions quickly?
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
ZoellaB
ZoellaBOP4mo ago
I did the first one, I might have configured it wrongly though with the exposed HTTPS or TCP ports
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
ZoellaB
ZoellaBOP4mo ago
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]"?
Madiator2011
Madiator20114mo ago
you should generate ssh keys first on your device, then on Runpod settings page paste public key then deploy pod
ZoellaB
ZoellaBOP4mo ago
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?
ZoellaB
ZoellaBOP4mo ago
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.
From An unknown user
From An unknown user
ZoellaB
ZoellaBOP4mo ago
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
Madiator2011
Madiator20114mo ago
for vs code you need tcp 22
ZoellaB
ZoellaBOP4mo ago
No description
No description
ZoellaB
ZoellaBOP4mo ago
This is what I set the runpod to be before starting it but fr some reason I couldnt connect ot it
No description
ZoellaB
ZoellaBOP4mo ago
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
Madiator2011
Madiator20114mo ago
remove bash command from container start
ZoellaB
ZoellaBOP4mo ago
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?
Madiator2011
Madiator20114mo ago
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
ZoellaB
ZoellaBOP4mo ago
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?
Madiator2011
Madiator20114mo ago
not that much but it's good start point
ZoellaB
ZoellaBOP4mo ago
Thanks so much
ZoellaB
ZoellaBOP4mo ago
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
No description
Madiator2011
Madiator20114mo ago
what do you see in logs
ZoellaB
ZoellaBOP4mo ago
Madiator2011
Madiator20114mo ago
ye something is no right. Are you sure you removed container start command
ZoellaB
ZoellaBOP4mo ago
Yes
ZoellaB
ZoellaBOP4mo ago
No description
ZoellaB
ZoellaBOP4mo ago
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
Madiator2011
Madiator20114mo ago
I think it's cause you removed storage and only left 5 GB
ZoellaB
ZoellaBOP4mo ago
I see, I'll try 20 GB
ZoellaB
ZoellaBOP4mo ago
same thing happened I couldn't connect to it whn I use th runpod vscode server template and I use 50GB
No description
ZoellaB
ZoellaBOP4mo ago
I think it is a vscode issue
ZoellaB
ZoellaBOP4mo ago
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.
Madiator2011
Madiator20114mo ago
nope it looks like it ask you to pick file
ZoellaB
ZoellaBOP4mo ago
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'

Did you find this page helpful?