MCPcopy
hub / github.com/kubernetes/node-problem-detector / RunSSHCommand

Function RunSSHCommand

test/e2e/lib/ssh/lib.go:177–179  ·  view source on GitHub ↗

RunSSHCommand returns the stdout, stderr, and exit code from running cmd on host as specific user, along with any SSH-level error. If user=="", it will default (like SSH) to os.Getenv("USER")

(cmd, user, host string, signer ssh.Signer)

Source from the content-addressed store, hash-verified

175// host as specific user, along with any SSH-level error.
176// If user=="", it will default (like SSH) to os.Getenv("USER")
177func RunSSHCommand(cmd, user, host string, signer ssh.Signer) (string, string, int, error) {
178 return runSSHCommand(realTimeoutDialer, cmd, user, host, signer, true)
179}
180
181// Internal implementation of runSSHCommand, for testing
182func runSSHCommand(dialer sshDialer, cmd, user, host string, signer ssh.Signer, retry bool) (string, string, int, error) {

Callers 1

RunFunction · 0.85

Calls 1

runSSHCommandFunction · 0.85

Tested by

no test coverage detected