runpodctl
runpodctl copied to clipboard
feat: add ssh-connect string subcommand
E-XXXX: Add SSH connect string subcommand
Adds the ability for the ssh subcommand to show the connect string for a given pod, or all of them.
How I tested it
Interactively; verified the output from the program's main function.
-
For a given pod:
go run main.go ssh connect test ssh [email protected] -p 53006 -
For a given pod with verbose output:
go run main.go ssh connect test --verbose ssh [email protected] -p 53006 # pod { id: "l6ecafz8g9l2pu", name: "test" } -
For a non existing pod
go run main.go ssh connect foo No pod with id or name "foo" found -
For all pods
go run main.go ssh connect ssh [email protected] -p 4498 # pod { id: "evoszzij78cm4u", name: "test2" } ssh [email protected] -p 53006 # pod { id: "l6ecafz8g9l2pu", name: "test" }
note: verbose output makes sense to always show when listing more than one pod, so the user knows which connect string refers to what pod, so that's why >1 pods listed will always provide pod identifying information.
Closes #30
PS, no idea what the "E-XXXX" is supposed to be, so let me know and I'll add an appropriate number there.