Search code examples
encryptionssh

ssh-key with multiple algorithm/cipher


How can I create a ssh-key with the following algorithm and cipher?

diffie-hellman-group-exchange-sha256 aes128-ctr,aes256-ctr,aes192-ctr hmac-sha2-256,hmac-sha2-512

Also, how can I check an existing private/public key have these algorithm/cipher


Solution

  • None of those are parts of the key itself. They're all part of the SSH session; all of them are negotiated as the session is established, and only if there's mutual support from the client and server processes.

    If you want to see what your client supports,

    • ssh -Q kex will show you key exchange algorithms (diffie-hellman-group-exchange-sha256 is one of those, but you might have others)
    • ssh -Q cipher will show you symmetric encryption ciphers (aes128-ctr,aes256-ctr,aes192-ctr are three of those, but you might have others)
    • ssh -Q mac will show you message authentication algorithms (hmac-sha2-256,hmac-sha2-512 are two of those, but you might have others)
    • ssh -Q key will show you key signing algorithms (you didn't list any in the original question; RSA, ECDSA, and Ed25519 are common ones, but you might have others)