MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / newNodesShellCmd

Function newNodesShellCmd

internal/cli/nodes.go:191–207  ·  view source on GitHub ↗

── nodes shell ──────────────────────────────────────────────────────────────

()

Source from the content-addressed store, hash-verified

189// ── nodes shell ──────────────────────────────────────────────────────────────
190
191func newNodesShellCmd() *cobra.Command {
192 return &cobra.Command{
193 Use: "shell <node>",
194 Short: "Open an interactive SSH shell on a node",
195 Long: `Open an interactive SSH shell on a Proxmox node.
196
197The SSH user is resolved from the node's source profile (in group mode), the
198active profile, or the global ssh_user config / --ssh-user flag. Authentication
199follows the standard SSH priority: agent > configured keyfile > ~/.ssh defaults.`,
200 Example: ` pvetui nodes shell pve01
201 pvetui --profile prod nodes shell pve01
202 pvetui --ssh-user root nodes shell pve01`,
203 Args: cobra.ExactArgs(1),
204 RunE: runNodesShell,
205 ValidArgsFunction: completeNodeNames,
206 }
207}
208
209func runNodesShell(cmd *cobra.Command, args []string) error {
210 nodeName := args[0]

Callers 1

newNodesCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected