generating ssh keys with openssl or ssh-keygen

I want to generate an ssh key-pair but i came across with two different ways of doing that.One is using openssl and the other is ssh-keygen.

Is there any difference as to the outcome/the final key of those two methods?


ssh-keygen, the OpenSSH command used to generate keys, uses the OpenSSL library, so there's really no difference between the two methods.

You can safely use ssh-keygen which is the default and more immediate tool to create a key pair for SSH pubkey authentication.