Difference between revisions of "AWS - EC2"

From belajarwiki
Jump to navigation Jump to search
m (Aditya moved page EC2 to AWS - EC2: Custom)
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
  
 
Akan membuat 2 file yaitu '''server-dev''' dan '''server-dev.pub'''.  
 
Akan membuat 2 file yaitu '''server-dev''' dan '''server-dev.pub'''.  
Copy kan isi dari server-dev.pub ke dalam '''~/.ssh/authorized_key'''.
+
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/

Latest revision as of 14:50, 10 February 2023

Upgrade EC2

  1. Matikan EC2
  2. 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

Referensi