-
How to ssh into aws ec2? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
1. Just ssh (easy but less convenient for long-term usage)Ask Emerald, Felix, or Zander for the certificate file "mathsearch-backend.pem". 2. Recommend method with vscodecd into .ssh dir with
Open vscode, make sure you have remote-ssh extension, do "Remote SSH: Connect to Host" and select our was. |
Beta Was this translation helpful? Give feedback.
1. Just ssh (easy but less convenient for long-term usage)
Ask Emerald, Felix, or Zander for the certificate file "mathsearch-backend.pem".
Do not give this file to others or upload it GitHub.
Put pem file under the dir you want to work in, cd into that dir.
Change pem file security by running
chmod 600 mathsearch-backend.pem
.Now we are ready to ssh into ec2, run
ssh -i "mathsearch-backend.pem" [email protected]
.2. Recommend method with vscode
cd into .ssh dir with
cd ~/.ssh
command.Put pem file under this dir and run
chmod 600 mathsearch-backend.pem
.Edit file ~/.ssh/config by adding below few lines. This adds ssh permission so your vscode can recognize.