This exists to trick the ssh library into continuing to try different public keys even when the current key cannot be properly parsed
()
| 250 | // different public keys even when the current key cannot be |
| 251 | // properly parsed |
| 252 | func 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 |
no outgoing calls
no test coverage detected