1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

キーペアを別アカウントに移行する方法

Posted at

概要

EC2で利用しているキーペアを別アカウントに移行する方法を調べてみました。
業務では利用しなかったのですが、メモがてら残しておきます。

手順

  1. コンソールにログインし、EC2の画面にてキーペアを選択する
    image.png
  2. アクションからキーペアをインポートする
  3. 以下画面になる
    スクリーンショット 2025-03-19 051210.png
  4. 手元にある秘密鍵から公開鍵ーを作成する
       ssh-keygen -y -f [秘密鍵の名前] > [作成する公開鍵の名前]  
    ※windowsを利用していたので、
     powershellにて上記コマンドを実行しました
  5. 作成した公開鍵をメモ帳で開く
  6. ssh-rsaから始まっている全文をコピーし貼り付ける
    image.png
  7. キーペアをインポートする

まとめ

上記手順にて、EC2起動時にインポートしたキーを利用できるようになります。
使う機会があるのかわかりませんが、誰かのためになれば幸いです。

1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?