We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0196e38 commit 2b41359Copy full SHA for 2b41359
ssh/handshake.go
@@ -479,7 +479,11 @@ func (t *handshakeTransport) sendKexInit() error {
479
msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, keyFormat)
480
}
481
482
- msg.KexAlgos = append(msg.KexAlgos, extInfoServer)
+ if firstKeyExchange := t.sessionID == nil; firstKeyExchange {
483
+ msg.KexAlgos = make([]string, 0, len(t.config.KeyExchanges)+1)
484
+ msg.KexAlgos = append(msg.KexAlgos, t.config.KeyExchanges...)
485
+ msg.KexAlgos = append(msg.KexAlgos, extInfoServer)
486
+ }
487
} else {
488
msg.ServerHostKeyAlgos = t.hostKeyAlgorithms
489
0 commit comments