JWT - SSH-KEYGEN vs OPENSSL

We just tried to set up JWT using RSA on our TYK but found some problem
When we use Openssl command to generate keypair is working fine on our TYK but when we use ssh-keygen command to generate keypair is not working as openssl command but
both JWTs works fine with all JWT client lib

What is the different between openssl and ssh-keygen?
Is it anything related to PKCS format?

Hello!

Can you show here both openssl and ssh-keygen commands, you are using to generate keys?

Thank you.

In general I the the issue here descibed in this thread https://stackoverflow.com/questions/46870569/ssh-keygen-and-openssl-gives-two-different-public-keys

And basic idea that openssl and ssh-kegen use different encodings for keys.
You can convert from one to another https://security.stackexchange.com/questions/32768/converting-keys-between-openssl-and-openssh

To convert from ssh .pub to openssl .pem format, you can run: ssh-keygen -f rsa.pub -e -m pem, and then use resulting key with Tyk.

Hope it helps!

here are both commands
SSH-KEYGEN - not working with Tyk
#ssh-keygen //just default no additional param

OPENSSL - working with Tyk
#openssl genrsa -out key.rsa
#openssl rsa -in key.rsa -pubout > key.rsa.pub