Set alpn to ssh if the first bytes from the client are 53 53 48 2d 32 2e 30 (SSH-2.0)
How to Find the Magic Bytes
nc -l localhost 2222 | hexyl
ssh localhost -p 2222 -o ConnectTimeout=1s
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 53 53 48 2d 32 2e 30 2d ┊ 4f 70 65 6e 53 53 48 5f │SSH-2.0-┊OpenSSH_│
│00000010│ 39 2e 36 0d 0a ┊ │9.6__ ┊ │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘
Set
alpntosshif the first bytes from the client are53 53 48 2d 32 2e 30(SSH-2.0)How to Find the Magic Bytes
nc -l localhost 2222 | hexyl