Zeni
Zeni

Reputation: 1005

Remote-SSH: identityFile path format on Winsows machine

Struggling to make Remote-SSH working in VS Code.

My local machine is Windows 10 and remote machine is Ubuntu 20.04. I have set configuration file "config" in C:\Users\xxx.ssh folder as bellow:

Host EC2
HostName ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com
User xxxx
IdentityFile D:/1WWW/KeyPairs/myKeyPair.pem

But its not working.
I am sure there is some problem in my identityFile path, but I don't know what. Any guidance please.

Upvotes: 1

Views: 4399

Answers (3)

stefan123t
stefan123t

Reputation: 343

Did you try the following syntax:

Host EC2
  HostName ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com
  IdentityFile /D:/1WWW/KeyPairs/myKeyPair.pem
  User xxxx

Upvotes: 0

Hong승원
Hong승원

Reputation: 146

Try using '~' (home path) instead of using the full path

enter image description here

Upvotes: 2

Jesús Martinez
Jesús Martinez

Reputation: 1

I would suggest to use puttygen.exe to generate a pair of public/private key.

Anyway the private key generated is not directly usable (it has a .ppk extension) and you need to go to Convertions -> Export OpenSSH key to get your private key in RSA format that can be used in the IdentityFile

Upvotes: 0

Related Questions