How to do VSCode remote connection to EC2 via EC2 Instance Connect (EIC)?

0

Hey, EIC looks like a pretty nice feature to SSH in private net EC2s https://aws.amazon.com/blogs/compute/secure-connectivity-from-public-to-private-introducing-ec2-instance-connect-endpoint-june-13-2023/

So that triggers the question: how to use EIC via the VSCode Remote Development extension to connect to an EC2?

1 Risposta
0

Hello.

If you use VSCode's RemoteSSH extension, try setting ssh_config as follows.
"ssh.pem" is the SSH key set to ec2-user.
With this setting, you will be able to connect to EC2 configured with ProxyCommand and manipulate files.

Host instance1
    HostName i-0eyyyyyyyyyyy
    User ec2-user
    IdentityFile .\Desktop\tmp\ssh.pem
    ProxyCommand aws ec2-instance-connect open-tunnel --instance-id i-0eyyyyyyyyyyy
profile picture
ESPERTO
con risposta 5 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande