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

【EC2】EC2を作成しターミナルログイン時のメモ

Last updated at Posted at 2022-02-20

秘密鍵をローカルの~/.ssh/配下に配置。

その後、ターミナルからEC2に接続するためのコマンドを叩く。

ssh -i ~/.ssh/XXXXX.pem ec2-user@${IPADRESS}
# 例:
# ssh -i ~/.ssh/aws-infra-ssh-key.pem ec2-user@00.00.000.000

しかし、初回ログインの際にパーミッションで怒られることがあります。
下記のコマンドで権限を変更
$sudo chmod 0600 sample.pem

その後、再度上記のsshコマンド実行で解決しました。

参考リンク

1
0
1

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?