R
RunPod3w ago
medic

Cant connect to Pod via SSH ( Putty )

Ip and Port is correct, i get rejected with Public SSH Key i set SSH Public Key, acces denied
52 Replies
Jason
Jason3w ago
can you create a new pod? btw what template are you using? templates must has a script to pull the keys and put it in the correct folder inside the pod ( runpod official image usually have this )
medic
medicOP3w ago
Hey, yes i can, i used RunPod Pytorch 2.1 template, the wild thing is i can acces via jupyter acces but not via ssh created a new pod... with betterTensorFlow.. same issue here...
Dj
Dj3w ago
Are you defining the SSH key your SSH Agent is using in your Settings?
medic
medicOP3w ago
yes it is defined under SSH Public Keys :/
Dj
Dj3w ago
I'm not sure what would cause it to not work aside from the SSH Key just being wrong :frowning3: If you're using the ssh.runpod.io url try the direct ip alternative
medic
medicOP3w ago
what do you mean with direct ip? i tried the provided .io url and direct ip with correct port :/ is the SSH Key for root or for the /workspace folder ?
Dj
Dj3w ago
Oh you're using PuTTY does the SSH key you gave runpod start with: ---- BEGIN SSH2 PUBLIC KEY ---- or ssh-rsa / ssh-ed25519
medic
medicOP3w ago
Thats kind of weird, im used to connect via putty and ssh tunnel via IP/Port on the VM or RunPod in this case 🙂 oh wait
medic
medicOP3w ago
im confused right now... i connect via putty to my user is my user and password should be public SSH key i set in https://www.runpod.io/console/user/settings Public SSH Key when prompted in the terminal? Or am i completely nuts right now... 😄
No description
medic
medicOP3w ago
also via ssh [email protected] -p 40159 -i ~/.ssh/id_ed25519 iam asked for a Password which is obviously not correct
Dj
Dj3w ago
Yes because that's not where your key is located probably Your user is root 👁️ And your password is blank, because you're using an SSH Key I can switch to a windows computer, give me a minute or two here
Dj
Dj3w ago
Connection, SSH, Auth, Credentials
No description
Dj
Dj3w ago
You should have a .ppk file selected here.
medic
medicOP3w ago
... that was my bad... im sorry thanks for the explanation<3
Dj
Dj3w ago
Pro Tip if that just worked, go back to session
Dj
Dj3w ago
Save it over the default settings (notice I also cleared the hostname, so I can just write it next time I open the app)
No description
Dj
Dj3w ago
So every time you open the app, that key is selected by default 😉 For persistent stuff, you just write the ip you want and save it again and you'll have a little library
Dj
Dj3w ago
You have to have text written in the box or it'll override Default
No description
medic
medicOP3w ago
thanks mate, appreciate that, was somewhere on another planet 😄 sad, the server refuses our key 😄
Dj
Dj3w ago
Inside of C:\Users\YOURNAME\.ssh You should have a .ppk file and a .pub file Or is it only the .ppk file? I haven't setup PuTTY keys in like 10 years If you don't have file extensions enabled, one will call itself a Putty Private Key and the other should call itself a Publisher Document or something
medic
medicOP3w ago
i only have the .pkk file as my private key for putty, and pasted the public key what was generated in puttygen into the public api key field in ui of runPod
Dj
Dj3w ago
Looking at that public key (or in the api key field in the runpod console) Does your key start with: ---- BEGIN SSH2 PUBLIC KEY ---- Comment: ...
medic
medicOP3w ago
nope it starts with ssh-ed25519 #####KEY####
Dj
Dj3w ago
Interesting, in this folder do you have an id_ed25519 file with no extension?
medic
medicOP3w ago
i found a pkk file what describes your question regarding ---- BEGIN SSH2 PUBLIC KEY ---- but i cant choose it in putty itself for private key...
Dj
Dj3w ago
Right, because it's not a private key. Putty uses their own weird format for these keys, hold on a sec don't lose that file
medic
medicOP3w ago
do you have another suggestion like putty?
Dj
Dj3w ago
PuTTY is fine, I also wouldn't know any alternative that isn't "just use a terminal lol" You can actually convert that ppk file to the more universal version with PuTTYGen
Dj
Dj3w ago
"Load"
No description
medic
medicOP3w ago
this stuff comes from puttygen tbh
Dj
Dj3w ago
No description
Dj
Dj3w ago
No description
Dj
Dj3w ago
Save the file as id_ed25519 (no extension), overriding anything with that name already if you need to.
medic
medicOP3w ago
will do sek
Dj
Dj3w ago
That is your private key, don't share it after you're done.
medic
medicOP3w ago
done
Dj
Dj3w ago
Next, inside the same .ssh folder make a file and call it id_ed25519.pub and open it with Notepad or something.
medic
medicOP3w ago
done
Dj
Dj3w ago
In PuTTYGen, the contents here go in that file and it's what you should tell RunPod your public key is
No description
Dj
Dj3w ago
Mine has an email attached to it, if you want to do the same you can write your email in the "Key comment" textbox Some people do email, some people put their username@hostname Not a requirement, more like style points.
medic
medicOP3w ago
your explanation pasted into the .pub file AND into RunPod Public Api Key
Dj
Dj3w ago
No description
Dj
Dj3w ago
Just whatevers inside that "Key" box for you, yours will look different.
medic
medicOP3w ago
correct done so
Dj
Dj3w ago
Should also be here
No description
medic
medicOP3w ago
correct and updated Public Key aswell
Dj
Dj3w ago
Great, do you have any Pods running?
medic
medicOP3w ago
yes
Dj
Dj3w ago
If you have any running, stop, terminate, then remake them (and also DM me your account email so I can refund you for the time we spent setting up your ssh key)
medic
medicOP3w ago
shouldnt we dont try the connection first or is a complete new pod necessary for that? Also, i never had such a granular support experience, Thank you! ive done so
Dj
Dj3w ago
You should be fine now to connect over SSH
medic
medicOP3w ago
terminated the two pods i tried the whole day, redeployed a new one and try to connect now connected thank you VERY VERY VERY much

Did you find this page helpful?