2
0

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 1 year has passed since last update.

AWS EC2 AmazonLinux2でsshキーを発行する

Posted at

概要

  • EC2 AmazonLinux2のインスタンス内でsshキーを発行する方法をまとめる。

方法

  1. 下記コマンドを実行してsshキーペアを作成する。

    $ ssh-keygen -t rsa
    >Enter file in which to save the key (/home/ec2-user/.ssh/id_rsa): 空欄でEnter
    >Enter passphrase (empty for no passphrase): 空欄でEnter
    >Enter same passphrase again: 空欄でEnter
    
  2. 下記コマンドを実行して公開鍵を出力する。

    $ cat /home/ec2-user/.ssh/id_rsa.pub
    
2
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?