MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / makePrivateKeySigner

Function makePrivateKeySigner

core/utils/ssh/ssh.go:150–155  ·  view source on GitHub ↗
(privateKey []byte, passPhrase []byte)

Source from the content-addressed store, hash-verified

148}
149
150func makePrivateKeySigner(privateKey []byte, passPhrase []byte) (gossh.Signer, error) {
151 if len(passPhrase) != 0 {
152 return gossh.ParsePrivateKeyWithPassphrase(privateKey, passPhrase)
153 }
154 return gossh.ParsePrivateKey(privateKey)
155}
156
157func (c *SSHClient) RunWithStreamOutput(command string, outputCallback func(string)) error {
158 session, err := c.Client.NewSession()

Callers 1

NewClientFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected