ssh: add example for KeyboardInteractive

The example shows a KeyboardInteractiveChallenge that prints the name
and instruction from the server and asks each question in turn, reading
answers without echo unless the server allows it, as RFC 4256 section
3.3 describes. Control characters other than newlines are removed from
the text sent by the server before it is printed, as the RFC also
recommends.

Fixes golang/go#35238

Change-Id: I4b02fe65574d018458ecca34f5f336b1dc299236
GitHub-Last-Rev: ed5a461c406c2e33ba91e18d8a2157d5a113b06a
GitHub-Pull-Request: golang/crypto#382
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/862905
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Mark Freeman <mark@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Nicola Murino <nicola.murino@gmail.com>
1 file changed
tree: 53402990866f585d4e7bba7b20405350c3ab64f6
  1. acme/
  2. argon2/
  3. bcrypt/
  4. blake2b/
  5. blake2s/
  6. blowfish/
  7. bn256/
  8. cast5/
  9. chacha20/
  10. chacha20poly1305/
  11. cryptobyte/
  12. curve25519/
  13. ed25519/
  14. hkdf/
  15. internal/
  16. md4/
  17. nacl/
  18. ocsp/
  19. otr/
  20. pbkdf2/
  21. pkcs12/
  22. poly1305/
  23. ripemd160/
  24. salsa20/
  25. scrypt/
  26. sha3/
  27. ssh/
  28. tea/
  29. twofish/
  30. x509roots/
  31. xtea/
  32. xts/
  33. .gitattributes
  34. .gitignore
  35. codereview.cfg
  36. CONTRIBUTING.md
  37. go.mod
  38. go.sum
  39. LICENSE
  40. PATENTS
  41. README.md
README.md

Go Cryptography

Go Reference

This repository holds supplementary Go cryptography packages.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.

The git repository is https://go.googlesource.com/crypto.

The main issue tracker for the crypto repository is located at https://go.dev/issues. Prefix your issue with “x/crypto:” in the subject line, so it is easy to find.

Note that contributions to the cryptography package receive additional scrutiny due to their sensitive nature. Patches may take longer than normal to receive feedback.