Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
EC2のキーペア置換に気を付けよう
Search
YouYou
August 07, 2021
Programming
8k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
EC2のキーペア置換に気を付けよう
詳細ブログ↓
https://zenn.dev/yuta28/articles/ec2-keypair-replace
YouYou
August 07, 2021
More Decks by YouYou
See All by YouYou
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
330
今インフラ技術をイチから学び直すなら
yuhta28
1
320
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
3
710
Datadog外形監視基盤をEC2から ECSへ移行してみた
yuhta28
0
1.9k
アウトプット頑張ったら企業からLT登壇の依頼がきた話
yuhta28
1
1.9k
小さなことから始めるAWSコスト最適入門
yuhta28
1
1.5k
Datadogのコストも監視しよう
yuhta28
1
1.1k
Rcloneを使った定期的なストレージ同期
yuhta28
0
900
Pulumiを触ってみよう
yuhta28
1
2.8k
Other Decks in Programming
See All in Programming
Seven New Principles of Software Engineering
yegor256
0
440
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
320
Crash Auto Pipelines
veronikapj
1
350
Spec-driven Development with AI
simas
PRO
0
2.2k
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
140
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.8k
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
120
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
280
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
870
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
380
Getting Started with Vibe Coding
miccheng
0
180
AI Augmentation Techniques with Liberty
ivargrimstad
1
340
Featured
See All Featured
Being A Developer After 40
akosma
PRO
92
590k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
970
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Music & Morning Musume
bryan
48
7.5k
Building Applications with DynamoDB
mza
96
7.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Producing Creativity
orderedlist
PRO
348
41k
From π to Pie charts
rasagy
1
430
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Transcript
EC2のキーペア置換に気を付けよう
Name:ユータ Occupation:SRE Twitter:@Y0u281 (オーでなくゼロです) ブログ:https://zenn.dev/yuta28 → 自己紹介 Twitter
目次 • 概要 • 手順 • 注意点 • まとめ
概要 • セキュリティーを見直すためにSSHのキーペアを置換することになった • authorized_keysファイルを編集するよりもAMI化してインスタンス起動で作成 するほうが楽と思い、AMIから設定した。
手順 1. キーペアを変更したいEC2のAMIを作成 2. AMIから新規にEC2を作成 3. キーペア選択時に新規のキーペアを選ぶ
手順 このインスタンスのキーペアNewWindows.pemを変更する
手順 AMIを作成して新規にEC2を起動する。
手順 新しいキーペア、afterKeyを選択しEC2を作成
注意点 前の鍵でも 入れてしまった!
注意点 authorized_keysファイルを確認すると前の公開鍵が残っていた。
まとめ • EC2の置換はAWS側で実施してくれない • キーペア配置後に古い公開鍵を消すことを忘 れずに
ありがとうございました 詳細は私のブログで ↓ EC2インスタンスのキーペア置換 について調べてみた