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

Method resolveNodeSSHKeyfile

internal/cli/cli_helpers.go:451–459  ·  view source on GitHub ↗

resolveNodeSSHKeyfile returns the SSH keyfile to use when connecting to a node.

(node *api.Node)

Source from the content-addressed store, hash-verified

449
450// resolveNodeSSHKeyfile returns the SSH keyfile to use when connecting to a node.
451func (s *cliSession) resolveNodeSSHKeyfile(node *api.Node) string {
452 if node != nil && node.SourceProfile != "" {
453 if p, ok := s.cfg.Profiles[node.SourceProfile]; ok && p.SSHKeyfile != "" {
454 return p.SSHKeyfile
455 }
456 }
457
458 return s.cfg.SSHKeyfile
459}
460
461// resolveVMSSHUser returns the SSH username to use when connecting directly to
462// a QEMU VM, falling back to the host SSH user if vm_ssh_user is not set.

Callers 3

runNodesShellFunction · 0.80
runLXCShellFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected