Import your public Yubikey cert to AWS Key pairs and name it Yubi.
Deploy EC2 with Yubi key attached.
Add the following to ~/.ssh/config:
# This is needed for VS code to know how to connect
Host i-0b377eeb467ae2f92
HostName i-0b377eeb467ae2f92
# SSH over Session Manager implementation. Change profile as you wish.
Host i-* mi-*
User ec2-user
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p' --profile <<my_aws_profile>> --region eu-central-1"
CMD + Shift + P → Remote-SSH: Connect Current Window to Host…
Select your host and connect.
You can open folder too, for file editing/transfer.
Celebrate!
Top comments (0)
Subscribe
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)