Get SSH Login Via API
When getting a pod via the API, it does not return any information on connecting via the Basic Terminal Access. Obviously the first bit of the username is pod ID but I haven't been able to identify the numbers proceeding after the dash. How might you get this username via the API or programmatically?
ssh [email protected] -i ~/.ssh/id_ed25519
cbdf4581hxb1vy == pod ID
64411092 == ?
5 Replies
Maybe you should setup your own docker image and template for that
Because if I'm not wrong the ssh server is setup from a script inside the docker image that you're using
I am using a custom template with my own docker image
Is it in the start up command recommended from runpod?:
bash -c 'apt update;DEBIANFRONTEND=noninteractive apt-get install openssh-server -y;mkdir -p ~/.ssh;cd $;chmod 700 ~/.ssh;echo "$PUBLIC_KEY" >> authorized_keys;chmod 700 authorized_keys;service ssh start;sleep infinity'
or much easier pip install OhMyRunPod
OhMyRunPod --setup-ssh
Oh that is useful
Thank you for that
That might work, the log gets sent to the log in runpod website too
But I think still how do you pass it programmatically or via API hasn't been solved by tjat
You need some form of API or programmatic layer for passing the login for ssh