2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【OCI Compute】Invalid ssh public key type "----" エラー

Last updated at Posted at 2019-11-29

環境

  • putty genで鍵を作成
  • ローカルPCはwindows

OCI Computeを作成する際に、公開鍵の指定で「Invalid ssh public key type "----"」が発生した場合の解決策

Invalid ssh public key type "----" の解決策

OpenSSH形式のカギをコピーして、.pub拡張子でファイルを保存する。

image.png

pem形式

image.png
Save Public Keyで作成した場合は、pem形式になっているので注意。

おまけ

鍵系のエラー

  • InvalidKey - Invalid PEM format

pem形式に対して以下のような形式

ssh-rsa XXX...

解決策(mac)

pem形式の秘密鍵作成
openssl genrsa -out ~/.oci/oci_api_key.pem -aes128 2048 

pem形式の公開鍵作成
openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem

フィンガープリント 取得
openssl rsa -pubout -outform DER -in ~/.oci/oci_api_key.pem | openssl md5 -c

参考

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?