Skip to content

Instantly share code, notes, and snippets.

@mom0tomo
Created April 5, 2022 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mom0tomo/add23b0e8ddbcbacb8065e23e3c0ee4a to your computer and use it in GitHub Desktop.
Save mom0tomo/add23b0e8ddbcbacb8065e23e3c0ee4a to your computer and use it in GitHub Desktop.
opensslコマンドでEC2のキーペアに登録したキーのフィンガープリントを確認する
AWSに保存されている公開鍵とローカル環境に作成された秘密鍵のSSH2フィンガープリントは一致しているはずなので、
AWS ConsoleでEC2 > キーペアに表示されるフィンガープリントと手元でopensslコマンドで表示されるフィンガープリントが一致するか確認する。
```
[ローカル環境]
$ openssl pkcs8 -in ~/.ssh/{キーのパス} -inform PEM -outform DER -topk8 -nocrypt | openssl sha1 -c
xx:xx:xx:xx...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment