执行以下操作:
ssh-keygen -t rsa
...
security import ~/.ssh/id_rsa -k login.keychain -t priv -f openssh2
我收到以下错误:
security: SecKeychainItemImport: Unknown format in import.
答案 0 :(得分:2)
您可以先将其转换为X.509 pem:
openssl rsa -in ~/.ssh/id_rsa -outform PEM -out id_rsa.pem
然后security
将能够识别它:
security import id_rsa.pem
示例输出:
1 key imported.