Search code examples
visual-studio-coderemote-accessremote-server

Can I use the "Vscode remote SSH" extension without a password?


Can I use the "Vscode remote SSH" extension without a password? I have a Linux server, my public key in the server and I know the username and the IP address. also, I'm able to ssh to the server using the terminal.

** Is there any way to achieve that?


Solution

  • Put something similar to your "C:\Users\yourhome\.ssh\config" that is known by vscode. I think "PreferredAuthentications" line is most important one.

    Host vscode
        HostName 192.168.0.1
        User linuxusername
        PreferredAuthentications publickey
        IdentityFile "C:\Users\yourhome\.ssh\privatekey"