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?

Olivier
已提问 5 个月前355 查看次数
1 回答
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
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则