Difference between revisions of "AWS - EC2"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
# Matikan EC2 | # Matikan EC2 | ||
# Pilih Actions > Instance settings > Change instance type | # Pilih Actions > Instance settings > Change instance type | ||
+ | |||
+ | ===Ganti pem=== | ||
+ | Buat pasangan kunci | ||
+ | ssh-keygen -b 4096 -f server-dev | ||
+ | |||
+ | Akan membuat 2 file yaitu '''server-dev''' dan '''server-dev.pub'''. | ||
+ | Copy kan isi dari server-dev.pub ke dalam '''~/.ssh/authorized_keys'''. | ||
+ | Ganti nama server-dev menjadi '''server-dev.pem'''. | ||
+ | |||
+ | ===Tambah User=== | ||
+ | Buat user baru | ||
+ | sudo adduser new_user | ||
+ | sudo su - new_user | ||
+ | mkdir .ssh | ||
+ | chmod 700 .ssh | ||
+ | touch .ssh/authorized_keys | ||
+ | chmod 600 .ssh/authorized_keys | ||
===Pranala Menarik=== | ===Pranala Menarik=== | ||
Line 8: | Line 25: | ||
===Referensi=== | ===Referensi=== | ||
* https://www.howtogeek.com/devops/how-to-upgrade-or-resize-a-running-ec2-instance/ | * https://www.howtogeek.com/devops/how-to-upgrade-or-resize-a-running-ec2-instance/ | ||
+ | * https://www.youtube.com/watch?v=Z3uiqtLXaM8 | ||
+ | * https://aws.amazon.com/premiumsupport/knowledge-center/new-user-accounts-linux-instance/ |
Latest revision as of 14:50, 10 February 2023
Upgrade EC2
- Matikan EC2
- Pilih Actions > Instance settings > Change instance type
Ganti pem
Buat pasangan kunci
ssh-keygen -b 4096 -f server-dev
Akan membuat 2 file yaitu server-dev dan server-dev.pub. Copy kan isi dari server-dev.pub ke dalam ~/.ssh/authorized_keys. Ganti nama server-dev menjadi server-dev.pem.
Tambah User
Buat user baru
sudo adduser new_user sudo su - new_user mkdir .ssh chmod 700 .ssh touch .ssh/authorized_keys chmod 600 .ssh/authorized_keys