3

My system admin created a new droplet on digital ocean, and provided me with root username and password and a public key txt file. when i try to access:

PS C:\Users\Simou> ssh [email protected]

I get this:

[email protected]: Permission denied (publickey).

since i'm used to powershell, i don't like using putty, even that putty provides the way to add a public ssh key. I think the problem is that i need to add that ssh key somewhere (saw that linux users do that), but i don't know how to do it in powershell, and i don't find any solutions when searching, because all of the result is about generating a private/public pair and putting my public on the server, but my case is the inverse of that. i must put the servers public on my powershell. any help is appreciated.

0

1 Answer 1

2

You are not connecting with PowerShell. You are connecting with OpenSSH ssh.

So you configure your private key the same way as with OpenSSH on Linux. If you generate your key pair with ssh-keygen, it gets automatically stored to the right place, where ssh will find it: .ssh folder in your Window profile in %USERPROFILE%, i.e. typically in C:\Users\username\.ssh. See also Location of OpenSSH configuration file on Windows.


As others have commented, you cannot authenticate with server's public key. Hard to tell what you got actually. But it might be a server's host key, which you are supposed to use to verify that you are connecting to the correct server. See my article about Understanding SSH key pairs.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .