1
0

More than 1 year has passed since last update.

AWS認定クラウドプラクティショナー合格に向けて Day10

Last updated at Posted at 2022-12-10

前回の内容

AWS認定クラウドプラクティショナー合格に向けて Day9

EC2インスタンス操作 1/2

前回はインスタンスのセッティングをして起動をした
今回は操作方法について確認する

操作方法

サーバーの種類によって異なるが2種類

  • GUI(Windowsサーバー向け操作)
  • SSHソフト(Linuxサーバー操作)

SSH接続方式は操作するPCがMacかWindowsかで異なる
Windowsの場合はTera Termのインストールが必要
MacはTerminalで行える
今回はMacで操作したためMacのみの紹介

SSHの接続設定

Amazon Linuxサーバーでインスタンスを起動したためSSHの接続設定を行う

初回時

1行目...ダウンロードした秘密鍵ファイルを.sshに移動
2行目...秘密鍵の権限を400に変更

~ $ MV ~/Downloads/sample.pem ~/.ssh
~ $ chmod 400 ~/.ssh/sample.pem

毎回のアクセス時

SSHの接続を行う
@以降はインスタンスのIPアドレスを記述

~ $ ssh -i ~/.ssh/sample.pem ec2-user@xxx.xxxxxxx

接続するか聞かれるのでyesと入力

The authenticity of host 'xxx.xxxxxxx (xxx.xxxxxxx)' can't be established.
ECDSA key fingerprint is ~~~~~~.
Are you sure you want to continue connecting (yes/no)?

接続完了

Warning: Permanently added 'xxx.xxxxxxx' (ECDSA) to the list of known hosts.

       __|  __|_  )
       _|  (     /   Amazon Linux 2 AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-2/
1 package(s) needed for security, out of 1 available
Run "sudo yum update" to apply all updates.
[ec2-user@~~~~ ~]$ 

次の記事は➡︎AWS認定クラウドプラクティショナー合格に向けて Day11

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