Score:0

How to connect to the Windows Server using SSH?

cn flag

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?

Score:0
mx flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.