Skip to content

Instantly share code, notes, and snippets.

@ARozputnii
Created February 1, 2022 09:20
Show Gist options
  • Save ARozputnii/837f5b30eb762faf45076d22025cfe77 to your computer and use it in GitHub Desktop.
Save ARozputnii/837f5b30eb762faf45076d22025cfe77 to your computer and use it in GitHub Desktop.
// CREATE AN EC2 INSTANCE
- In local machine Terminal enter the following command and copy the result.
cat ~/.ssh/id_rsa.pub
- from the AWS EC2 dashboard click ‘Key Pairs’, then ‘Import Key Pairs’.
Specify the name id_rsa and paste the key you just copied from your local machine. Then click ‘Import’.
- create ec2 instance LTS Ubuntu.
- in process creation:
add security group - TCP with port 80 and allow anywhere;
on last step choose to associate an SSH key to enable secure remote login,
select 'Choose an existing key pair' and select id_rsa;
- for login need in dir where be present key for login - open terminal:
ssh -i ~/.ssh/id_rsa.pub ubuntu@public_IPv4
(if 'ubuntu' user does`t exist change on 'root' )
SETUP SERVER
- login to server (ssh -i key_name.pem your-user@public_IPv4)
- for setting deploy use next steps:
https://gist.github.com/ARozputnii/ed4709786db2d62c04ea1d00bba65f39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment