LoginSignup
8
10

More than 5 years have passed since last update.

【turorial】AWS Cloud9で作成したEC2インスタンスにSSH接続

Posted at

2018/04/19に実施。

1.EC2ダッシュボードで「キーペアの作成」をクリック。
1.jpg

2.キーペア名を入力して「作成」をクリック。
2.jpg

3.ポップアップアップが表示される。任意の場所に保存。
3.jpg

4.ダウンロードしたpemファイルから、パブリックキーを取得。

ssh-keygen -y
Enter file in which the key is(): →pemファイルのパスを指定。

5.AWS Cloud9で「~/.ssh/authorized_keys」を編集。

vim ~/.ssh/authorized_keys

最下部に「4.」のパブリックキーを貼り付け。

6.SSHで接続。

ssh -i "(pemファイル名)" ec2-user@(パブリックDNS)

終わり。

8
10
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
8
10