- change format private
umask 077 openssl pkey < id_rsa > id_rsa.pkcs8 ssh-add id_rsa.pkcs8
ssh: Error loading key "./id_rsa": invalid format
Traditionally OpenSSH used the same private key format is identical to the older PEM format used by OpenSSL. (Because it uses OpenSSL for parsing the key, it will accept the newer PKCS#8 format as well.) So the issue can be one of: Your OpenSSL version refuses to load this key format.
https://superuser.com/questions/1370877/ssh-error-loading-key-id-rsa-invalid-format

Seonglae Cho