Hi,
at my company, we are usually using pem file to connect to our instances like:
ssh -i '/path/to/file.pem' ubuntu@hostname
I didn't find any way to configure remote-ssh to use those files.
You can specify a .pem file to use in your .ssh/config:
Host whatever
IdentityFile /path/to/file.pem
Host remote-vscode
HostName
User ec2-user
IdentityFile d:/PATH/TO/FILE.pem
LOCATED AT: https://code.visualstudio.com/docs/remote/ssh#_getting-started
Thanks a lot @karmeleon and @SubodhChettri, it works like a charm!
// fyi @chuxel tips & tricks worthy?
@egamma The syntax is mentioned in three spots currently:
In the sample here in the main article: https://code.visualstudio.com/docs/remote/ssh#_remembering-hosts-you-connect-to-frequently
Tips and tricks here: https://code.visualstudio.com/docs/remote/troubleshooting#_improving-your-security-with-a-dedicated-key
and again here related to reusing a putty generated key: https://code.visualstudio.com/docs/remote/troubleshooting#_reusing-a-key-generated-in-puttygen
@chuxel goodness, thanks.
Most helpful comment
You can specify a .pem file to use in your .ssh/config: