MCPcopy Index your code
hub / github.com/smallstep/cli / withDefaultAuthMethod

Function withDefaultAuthMethod

internal/sshutil/shell.go:65–74  ·  view source on GitHub ↗

withDefaultAuthMethod adds the ssh.Agent as an ssh.AuthMethod.

()

Source from the content-addressed store, hash-verified

63
64// withDefaultAuthMethod adds the ssh.Agent as an ssh.AuthMethod.
65func withDefaultAuthMethod() ShellOption {
66 return func(s *Shell) error {
67 agent, err := DialAgent()
68 if err != nil {
69 return err
70 }
71 s.authMethods = append(s.authMethods, agent.AuthMethod())
72 return nil
73 }
74}
75
76// withDefaultDialer adds a direct connection dialer.
77func withDefaultDialer(user, address string) ShellOption {

Callers 1

NewShellFunction · 0.85

Calls 2

DialAgentFunction · 0.85
AuthMethodMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…