runpodctl icon indicating copy to clipboard operation
runpodctl copied to clipboard

How to get connect information from runpodctl ?

Open thecloudco opened this issue 2 years ago • 2 comments

After creating a pod with runpodctl, how can I get the same connection information that I get on the console to access the pod. I am talking about the ssh connection info (e.g: ssh [email protected] -i ~/.ssh/id_ed1111111)

Right now I have to login to the console to get this information. What is the preffered way to get this from the CLI ?

thecloudco avatar Mar 24 '23 19:03 thecloudco

+1 here. It is very annoying that over CLI it's not possible to either execute remote command or get details about SSH. For us it makes use of CLI rather useless

denstepa avatar Apr 30 '24 07:04 denstepa

I have the same issue, and am working on implementing this. My plan is to solve this in two steps.

  1. Add an option to create pod that allows for starting the SSH server, since it isn't by default. Can't do SSH login without the sshd server running, so this is a pre-req.
  2. Output the SSH connect string, exactly like in the web console.

No. 1 is easy, as I already have a patch for it that I'll push shortly (and reference this ticket).

As for no 2, I'm not sure where best to add this. As part of the ssh sub-command seems most logical though, so I think I'll start there, but suggestions are welcome.

Edit: Ok, just mentioning a ticket didn't link to it, so here is the PR for the --startSSH option: https://github.com/runpod/runpodctl/pull/165

I didn't want to use any of the "fix" or "closes" shortcuts, since that PR isn't necessarily a prereq for all use cases this feature request is about. One could very well create pods using the webUI and start the SSH server that way, and then only use the CLI for getting the SSH details. I don't expect that's the typical use case though, but it's an argument at least for why that PR isn't a strict requirement for this issue.

jojje avatar Sep 28 '24 15:09 jojje