The key exchange algorithm is chosen in the SSH KEXINIT handshake and determines how the session key is agreed. These captures run the same connection with curve25519, ecdh-sha2-nistp256 and diffie-hellman-group14 so the negotiation lists and the size and number of key exchange messages can be compared. curve25519 is the modern default; the DH groups show what older servers still offer.
SSH key exchange comparison between curve25519-sha256, ECDH over NIST curves and classic Diffie-Hellman groups.
SSH Key Exchange Algorithm Comparison (curve25519, ECDH, DH)
Three SSH connections forcing different KEX algorithms: curve25519-sha256, ecdh-sha2-nistp521, and diffie-hellman-group16-sha512. The KEX_INIT packets reveal algorithm proposals and selections. Different algorithms produce different key exchange message sizes and computational patterns.