Jump to content

First of all might be in the wrong category soo... whops, suggest which one is correct please

 

I have a server setup at the moment to which I've generated SSH keys a long time ago.

I've been using putty to connect to it and that's completely fine for what i mostly need, I know how to setup keys inside of there, etc.

 

Recently though, I needed to use the Visual Studio Code SSH plugin to connect to a server and be able to browse/edit its files via VSC.

One problem with that is that it pulls SSH keys from Windows, I'm not sure how to tell it which key to specifically use or anything as such, so I need to add a key into Windows, and existing key I already got.

image.png.971c645ba434539ef551dcedb9f88329.png

 

Is this possible to do? Everything else I've found online suggest generating SSH keys trough Windows itself, but I don't need that, I already got this setup and I want to continue using this specific key.

 

Thanks in advance!

Link to comment
https://linustechtips.com/topic/1360987-add-existing-ssh-keys-into-windows/
Share on other sites

Link to post
Share on other sites

20 hours ago, Aleksa Djordjic said:

First of all might be in the wrong category soo... whops, suggest which one is correct please

 

I have a server setup at the moment to which I've generated SSH keys a long time ago.

I've been using putty to connect to it and that's completely fine for what i mostly need, I know how to setup keys inside of there, etc.

Why?! Windows has OpenSSH built-in.

Works the same way as it does for Linux based OS.

ssh-keygen is also included in Windows, if you wonder.

 

Quote

Recently though, I needed to use the Visual Studio Code SSH plugin to connect to a server and be able to browse/edit its files via VSC.

One problem with that is that it pulls SSH keys from Windows, I'm not sure how to tell it which key to specifically use or anything as such, so I need to add a key into Windows, and existing key I already got.

image.png.971c645ba434539ef551dcedb9f88329.png

Private key is private. It should not be shared and be in the system you connect to. 

You generality place keys under C:\Users\<account name>\.ssh\, similarly to Linux based OSs (~/.ssh)

Or you can just put it where you want, and just use the argument in the openssh command to specify the key.

 

Quote

Is this possible to do? Everything else I've found online suggest generating SSH keys trough Windows itself, but I don't need that, I already got this setup and I want to continue using this specific key.

The problem is that you are using PuTTY to generate the key... it is its own thing.

You'll need to convert the key from ppk to openSSH.

PuTTY likes to be special... which is why I don't recommend it. It was... something... ages ago when Windows didn't have openSSH, WSL and all of that good stuff... now there is really no point. People still uses PuTTY mostly because they have everything setup ages ago, and don't have the time or can't be bothered to modernize their setup.

 

And please Windows Terminal... you'll thank me. Based on the build of Windows 10 you are, it's built-in or can be downloaded from the Store:

https://www.microsoft.com/en-ca/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab

It's open source: https://github.com/Microsoft/Terminal

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×