resolveNodeSSHKeyfile returns the SSH keyfile to use when connecting to a node.
(node *api.Node)
| 449 | |
| 450 | // resolveNodeSSHKeyfile returns the SSH keyfile to use when connecting to a node. |
| 451 | func (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. |
no outgoing calls
no test coverage detected