If you generate a key pair with ssh-keygen you can, depending on version, get a private key with the header
-----BEGIN OPENSSH PRIVATE KEY-----
This type of key is not compatible with f.ex. jsch and needs to be converted so that it has the header
-----BEGIN RSA PRIVATE KEY-----
They way to convert existing keys is as follows:
ssh-keygen -p -m PEM -f yourkeyfile
This command is for setting a new passphrase for your private key, but since the -m PEM flag is there it will write the key in the classic format.