Currently there is no opportunity for SSH format to add a comment like for the "corresponding" openSSH command:
ssh-keygen -t ed25519 -C "user@example.com" -N "MySecretPassword" -f id_ed25519_key
In the current version an SSH key is generated like that:
key_bytes = key.private_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PrivateFormat.OpenSSH,
encryption_algorithm=serialization.BestAvailableEncryption("MySecretPassword".encode('utf-8')),
)
but there is no ssh_comment parameter to be used to add the "user@example.com" to the private key.
Ok, it is there a work around for the PUBLIC key appending the comment, but with SSH format is possible to "embed" the comment inside the private key directly.
Would be possible to implement that feature in the library?
Currently there is no opportunity for SSH format to add a comment like for the "corresponding"
openSSHcommand:ssh-keygen -t ed25519 -C "user@example.com" -N "MySecretPassword" -f id_ed25519_keyIn the current version an SSH key is generated like that:
but there is no
ssh_commentparameter to be used to add the "user@example.com" to the private key.Ok, it is there a work around for the PUBLIC key appending the comment, but with SSH format is possible to "embed" the comment inside the private key directly.
Would be possible to implement that feature in the library?