Reputation: 71
I'm looking for a way to connect to a server with VSCode without an SSH key. One way is to enable password authentication which I'd rather avoid. The servers are on company LAN but I still don't want to go that route.
We've looked at solutions such as Okta ASA for keyless SSH connection (client/agent model). And also AWS SSM with IAM Roles and profiles. Both work great through Terminal, but not sure how that connection could be passed through an IDE such as when you use a key or password.
Any thoughts or directions would be helpful. Thanks!
Upvotes: 7
Views: 1002
Reputation: 635
Though it was asked almost 4 years, it is still relevant. The steps are as follows:
Host i-63126312318
IdentityFile ~/.ssh/id_rsa
ProxyCommand ~/.ssh/aws-ssm-ec2-proxy-command.sh %h %r %p ~/.ssh/id_rsa.pub
StrictHostKeyChecking no
Get aws-ssm-ec2-proxy-command.sh from https://github.com/qoomon/aws-ssm-ssh-proxy-command/blob/master/README.md
Replace i-63126312318 with your instance id.
You can use VS Code Remote host to connect using SSM.
Upvotes: 0