Difference between revisions of "AWS - EC2"
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
Copy kan isi dari server-dev.pub ke dalam '''~/.ssh/authorized_keys'''. | Copy kan isi dari server-dev.pub ke dalam '''~/.ssh/authorized_keys'''. | ||
Ganti nama server-dev menjadi '''server-dev.pem'''. | 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 17: | Line 26: | ||
* 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://www.youtube.com/watch?v=Z3uiqtLXaM8 | ||
+ | * https://aws.amazon.com/premiumsupport/knowledge-center/new-user-accounts-linux-instance/ |
Revision as of 14:32, 8 November 2022
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