CoderSigner generates a deterministic SSH signer based on the provided seed. It uses RSA with a key size of 2048 bits.
(seed int64)
| 1384 | // CoderSigner generates a deterministic SSH signer based on the provided seed. |
| 1385 | // It uses RSA with a key size of 2048 bits. |
| 1386 | func CoderSigner(seed int64) (gossh.Signer, error) { |
| 1387 | // Clients should ignore the host key when connecting. |
| 1388 | // The agent needs to authenticate with coderd to SSH, |
| 1389 | // so SSH authentication doesn't improve security. |
| 1390 | coderHostKey := agentrsa.GenerateDeterministicKey(seed) |
| 1391 | |
| 1392 | coderSigner, err := gossh.NewSignerFromKey(coderHostKey) |
| 1393 | return coderSigner, err |
| 1394 | } |