0

I’m using Windows Server 2019

What I’ve done:

• I installed ‘OpenSSH SSH Server’ on my virtual machine using App > Apps & features.

• I added the Firewall Rule for port 22 and started the SSH server.

• I installed PuTTYgen on my local machine so I can create public and private keys.

• I’m using Vultr.com as a cloud host so I added the public key to the SSH keys on their site.

• I created the ‘administrators_authorized_keys.pub’ file inside the main ssh folder and added the public key inside of it.

• I added authorized_keys folder inside the main ssh folder and added public keys (both PuTTY and openSSH type) and a private key

• I installed PuTTY so I can establish the connection

• I added the auth key (Private PuTTY file key) to the request.

• I’m using the port 22

The errors that I get:

• When I try to log in with host username (or any other) PuTTY gives me the 'Server refused our key' response

• When I try to use ’ ssh-keygen -t ed25519 -C "[email protected]"’ I get ’Generating public/private keys’ and it stops there. It doesn’t ask for the root where to generate them or anything. The process is just blocked.

I’ve also tried generating the keys using ssh-keygen.exe directly but it just generates the private key. I tried generating a public key from private key using this: https://blog.tinned-software.net/generate-public-ssh-key-from-private-ssh-key/ And changing all public keys to this one, but still didn’t work with PuTTY, still gives me the same error.

What is working:

• When I don’t set the private key on the PuTTY request, I can connect to the server.

Questions:

Have I missed any steps? What am I doing wrong here, and how to set up the SSH connection properly?

1 Answer 1

0

OpenSSH Server capability can be enabled with below PS. This feature was originally introduced with Windows 10 1804 and then added into Windows Server 2019

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Set-Service sshd -StartupType Automatic
Set-Service ssh-agent -StartupType Automatic
Start-Service sshd
Start-Service ssh-agent

Connect to server by using below command

ssh username@domain@servername

You must log in to answer this question.

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