MCPcopy
hub / github.com/wavetermdev/waveterm / createDummySigner

Function createDummySigner

pkg/remote/sshclient.go:252–263  ·  view source on GitHub ↗

This exists to trick the ssh library into continuing to try different public keys even when the current key cannot be properly parsed

()

Source from the content-addressed store, hash-verified

250// different public keys even when the current key cannot be
251// properly parsed
252func createDummySigner() ([]ssh.Signer, error) {
253 dummyKey, err := rsa.GenerateKey(rand.Reader, 2048)
254 if err != nil {
255 return nil, err
256 }
257 dummySigner, err := ssh.NewSignerFromKey(dummyKey)
258 if err != nil {
259 return nil, err
260 }
261 return []ssh.Signer{dummySigner}, nil
262
263}
264
265// This is a workaround to only process one identity file at a time,
266// even if they have passphrases. It must be combined with retryable

Callers 1

createPublicKeyCallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected