Installing and Configuring OpenSSH on Windows Server 2019

Published 01-09-2019 12:01 AM 101K Views
Microsoft

While I’ve never had a problem with PowerShell remoting for remote command line interaction with Windows Server, I’ve often found that it isn’t something that many systems administrators, especially those that work in heterogeneous environments, are entirely at ease with. I’ve lost count of the number of times that I’ve seen experienced admins RDP across to a box running Windows Server so that they can interact with the operating system through a command prompt.

 

Windows Server 2019 and the most recent version of Windows 10 include the ability to install both an SSH client and an SSH server. Because most of us work with heterogenous systems, we are familiar with SSH’ing into a server or device to perform admin tasks. Now that it’s available and easy to configure on Windows Server 2019, I find myself using SSH, rather than other remote connection methods, as my default method of remotely connecting to servers, be they proximate or running in Azure.

 

To get an SSH client onto Windows 10 or Windows Server 2019, without using 3rd party software or installing Windows Subsystem for Linux, use the PowerShell command:

 

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0


To add an SSH client and SSH server to Windows Server 2019, use the following PowerShell commands:

 

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0


I have found it useful to add both client and server capability to Windows Server. This is also useful if the server will function a jump box. Once you’ve added the capability, you need to do a few things to get the SSH server working before you’re ready to go.

 

If you’re intending to use key based, rather than password based, authentication, you should also run the following command on the server to install an OpenSSH related PowerShell module that includes tools to help you configure that functionality:

 

Install-Module -Force OpenSSHUtils -Scope AllUsers

I also recommend running the following PowerShell commands on the server to install the Nano text editor, which allows you to edit text files through an SSH session. If you’re going to use key based authentication rather than passwords, you’ll need to edit one of the config files (I’ll explain what you need to do a little later in the article):

 

Set-ExecutionPolicy Bypass
Iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
choco install nano -y

The next thing you’ll need to do on your server is to configure the disabled ssh-agent service to automatically start and also configure the sshd service to automatically start. To do this, run the following PowerShell commands:

 

Set-Service -Name ssh-agent -StartupType ‘Automatic’
Set-Service -Name sshd -StartupType ‘Automatic’

The final step in getting SSH running on Windows Server 2019 is to run the following commands to start the relevant services:

 

Start-Service ssh-agent
Start-Service sshd

If you do all of this, you’ll be able to connect using password passed authentication from an SSH client using the syntax:

 

ssh username@hostname_or_IP_address

If you’re connecting to a domain account the format is

 

ssh username@domain@hostname_or_IP_address

The reality of SSH is that the vast majority of people that use it, use key based authentication rather than password based authentication. To get key based authentication working with Windows Server 2019’s SSH server, you’ll need to the following:

 

On the client change to the .ssh directory and run the command ssh-keygen accepting the defaults (you can change the name of the keys and provide a key password if you really want to, but that’s beyond the scope of this article)

 

Cd ~\.ssh\
Ssh-keygen

Doing this with the default values will create a public and private key. The private key will be id_rsa and the public key will be id_rsa.pub.

 

The next thing you should do is add your private key to your Windows security context. You can do this by running the following three commands:

 

Set-Service ssh-agent -StartupType ‘Automatic’
Start-service ssh-agent
Ssh-add ~\.ssh\id_rsa

Once you’ve done this, you’ll want to deploy your public key to the Windows Server 2019 server that you want to use SSH key based authentication with. To do this, perform the following steps (where chancellor is the name of the user account you’re configuring SSH key based authentication for):

 

Ssh chancellor@172.16.0.15 mkdir c:\users\chancellor\.ssh\
Scp c:\users\chancellor\.ssh\id_rsa.pub chancellor@172.16.0.15:C:\Users\Administrator\.ssh\authorized_keys

You’ll then need to run the following PowerShell command, located in that OpenSSHUtils PowerShell module I mentioned earlier, to configure some of the permissions for the authorized keys file. You might even want to SSH across to the server using password based authentication to do this:

 

Repair-AuthorizedKeyPermission C:\users\Chancellor\.ssh\authorized_keys

Because the PowerShell cmdlet doesn’t entirely work as it should, you’ll also need to run the following command as “NT SERVICE\sshd” should not have any permissions to the authorized_keys file (if it does, key based authentication doesn’t seem to work)

 

Icacls authorized_keys /remove “NT SERVICE\sshd”

The final step you’ll need to take requires you to edit the c:\ProgramData\ssh\sshd_config file, which you can do using the nano text editor and comment out the following lines (which are at the end of the file):

 

# Match Group administrators                                                   
#       AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys 

You may need to do this locally on the Windows Server 2019 box. Once this is done, you can restart the sshd service (restart-service sshd) and you will be able to connect from your client using key based authentication.

 

If you want to learn about advanced configuration options for OpenSSH server on Windows Server 2019, consult the following article: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration?...

Windows_Server_2019_OpenSSH.jpg

 

 

 

14 Comments
Microsoft

I've also posted a version of this on YouTube

Visitor

Nice Doc!
Super to the point and easy to read.
I appreciate your contributions!

Established Member

Thank you, @OrinThomas,

Your instructions worked perfectly even at the end where you instructed us to go back and set proper permissions for the server side authorized keys and also to comment out the two lines in the server side c:\ProgramData\ssh\sshd_config at the end.

 

I had followed the Microsoft Docs documentation but they left the last two parts out and it would not work. The documentation needs to be updated on the site: 

https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement

 

Anyway, your article was complete and you are properly methodical and I thank you.

 

New Contributor

When I run the command similar to (swapping the my user account for Chancellor)

Repair-AuthorizedKeyPermission C:\users\Chancellor\.ssh\authorized_keys

I receive the message:

(location) is not in the profile folder of any user. Skip checking...

 

Any thoughts

Frequent Visitor

Thanks @OrinThomas , a very useful report.

I needed a sftp server in mode chroot jail. So, I added the next lines to the file sshd_config, for that purpose . Here is the information for anyone who need it.

PermitTTY no
ChrootDirectory C:/my_path_for_root_sftp/%u
Occasional Visitor

Just missed a step to restart the sshd service after updating the  c:\ProgramData\ssh\sshd_config file.

Occasional Visitor
@emoldes that's exactly what I was looking for but it doesn't work on Windows. This ChrootDirectory with /%u this format is for Linux, right?
I want that each user who SFTP to the server goes to his unique home folder and on Linux you can use ChrootDirectory C:/PATH_to_root_folder/%u but in window you can setup only ChrootDirectory C:\PATH_to_root_folder\. If that's not correct can someone tell me solution for OpenSSH on Windows server. thanks.
 
Frequent Visitor

@puscavnik 

The configuration for ChrootDirectory works ok. Here you are an example that I usually use. I hope this helps you.

emoldes_0-1588334408477.png

 

Microsoft

not able to install opensshpsutils module

Occasional Visitor

I have struggled with the installation of OpenSSHUtils too

to solve this I have installed it using the following. 

 

Install-Module -Name OpenSSHUtils -RequiredVersion 0.0.2.0

 

Occasional Visitor

How to browse and view the different versions available to install?

dhbcub: you used RequiredVersion 0.0.2.0 which is different from what OrinThomas used.

If I run the "Get-Module -ListAvailable" Or "Get-Module -All" I do get a list of items but OpenSSH is not listed anywhere.

 

Senior Member

We use OpenSSH(7.7 & 8.1) OS: Windows Server 2019 Standard.

From time to time, the service hangs - although the state of the service is running (in service management),

it stops listening on port 22.

In some cases, when trying to connect using telnet, we get a "black screen" without the local version string,

in other cases, telnet cannot connect at all. This can happen after a random time.

After restarting the service, it works normally.

Please find the configuration file and the related part of log below.

Thank you in advance.

 

Configuration file :

# Logging
SyslogFacility LOCAL0
LogLevel DEBUG3

# Authentication:
PermitRootLogin prohibit-password
StrictModes yes

PubkeyAuthentication no

AuthorizedKeysFile	.ssh/authorized_keys

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes

AllowTcpForwarding no

# override default of no subsystems
Subsystem	sftp	sftp-server.exe 

Match User Upload031
    ChrootDirectory D:\SFTP\Upload031
	
Match User Upload032
    ChrootDirectory D:\SFTP\Upload032
	
Match User Upload033
    ChrootDirectory D:\SFTP\Upload033
	
Match User Upload034
    ChrootDirectory D:\SFTP\Upload034
	
Match User Upload035
    ChrootDirectory D:\SFTP\Upload035
	
Match User Upload036
    ChrootDirectory D:\SFTP\Upload036
	
Match User Upload037
    ChrootDirectory D:\SFTP\Upload037
	
Match all
    ChrootDirectory D:\sftp_dump\

 

Log :

6152 2021-03-30 10:21:19.913 debug3: fd 5 is not O_NONBLOCK
6152 2021-03-30 10:21:19.913 debug3: spawning "C:\\openssh\\sshd.exe" -R
6152 2021-03-30 10:21:19.913 debug3: send_rexec_state: entering fd = 8 config len 5262
6152 2021-03-30 10:21:19.913 debug3: ssh_msg_send: type 0
6152 2021-03-30 10:21:19.944 debug3: send_rexec_state: done
7984 2021-03-30 10:21:19.975 debug1: inetd sockets after dupping: 4, 4
7984 2021-03-30 10:21:19.975 Connection from 192.168.XXX.XXX port 57853 on 10.XXX.XXX.XXX port 22
7984 2021-03-30 10:21:19.975 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
7984 2021-03-30 10:21:19.975 error: kex_exchange_identification: Connection closed by remote host
6152 2021-03-30 10:21:19.991 debug3: fd 5 is not O_NONBLOCK
6152 2021-03-30 10:21:19.991 debug3: spawning "C:\\openssh\\sshd.exe" -R
6152 2021-03-30 10:21:20.007 debug3: send_rexec_state: entering fd = 9 config len 5262
6152 2021-03-30 10:21:20.007 debug3: ssh_msg_send: type 0
3808 2021-03-30 10:21:20.053 debug1: inetd sockets after dupping: 4, 4
3808 2021-03-30 10:21:20.053 Connection from 192.168.XXX.XXX port 57854 on 10.XXX.XXX.XXX port 22
3808 2021-03-30 10:21:20.053 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
3808 2021-03-30 10:21:20.053 debug1: Remote protocol version 2.0, remote software version RebexSSH_1.0.6264.1
3808 2021-03-30 10:21:20.053 debug1: no match: RebexSSH_1.0.6264.1
3808 2021-03-30 10:21:20.053 debug2: fd 4 setting O_NONBLOCK
3808 2021-03-30 10:21:20.163 debug3: spawning "C:\\openssh\\sshd.exe" -y
3808 2021-03-30 10:21:20.163 debug2: Network child is on pid 7008
3808 2021-03-30 10:21:20.163 debug3: send_rexec_state: entering fd = 6 config len 5262
3808 2021-03-30 10:21:20.163 debug3: ssh_msg_send: type 0
3808 2021-03-30 10:21:20.210 debug3: send_rexec_state: done
3808 2021-03-30 10:21:20.210 debug3: ssh_msg_send: type 0
3808 2021-03-30 10:21:20.210 debug3: ssh_msg_send: type 0
3808 2021-03-30 10:21:20.210 debug3: preauth child monitor started
3808 2021-03-30 10:21:20.210 debug1: list_hostkey_types: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
3808 2021-03-30 10:21:20.210 debug3: send packet: type 20 [preauth]
3808 2021-03-30 10:21:20.210 debug1: SSH2_MSG_KEXINIT sent [preauth]
3808 2021-03-30 10:21:20.210 debug3: receive packet: type 20 [preauth]
3808 2021-03-30 10:21:20.210 debug1: SSH2_MSG_KEXINIT received [preauth]
3808 2021-03-30 10:21:20.210 debug2: local server KEXINIT proposal [preauth]
3808 2021-03-30 10:21:20.210 debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1 [preauth]
3808 2021-03-30 10:21:20.210 debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
3808 2021-03-30 10:21:20.210 debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
3808 2021-03-30 10:21:20.210 debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
3808 2021-03-30 10:21:20.210 debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
3808 2021-03-30 10:21:20.210 debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
3808 2021-03-30 10:21:20.210 debug2: compression ctos: none,zlib@openssh.com [preauth]
3808 2021-03-30 10:21:20.210 debug2: compression stoc: none,zlib@openssh.com [preauth]
3808 2021-03-30 10:21:20.210 debug2: languages ctos:  [preauth]
3808 2021-03-30 10:21:20.210 debug2: languages stoc:  [preauth]
3808 2021-03-30 10:21:20.210 debug2: first_kex_follows 0  [preauth]
3808 2021-03-30 10:21:20.210 debug2: reserved 0  [preauth]
3808 2021-03-30 10:21:20.210 debug2: peer client KEXINIT proposal [preauth]
3808 2021-03-30 10:21:20.210 debug2: KEX algorithms: diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group15-sha512,diffie-hellman-group16-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1 [preauth]
3808 2021-03-30 10:21:20.210 debug2: host key algorithms: ssh-dss,rsa-sha2-256,ssh-rsa-sha256@ssh.com,rsa-sha2-512,ssh-rsa,x509v3-sign-rsa-sha256@ssh.com,x509v3-sign-rsa,x509v3-sign-dss,ecdsa-sha2-nistp256 [preauth]
3808 2021-03-30 10:21:20.210 debug2: ciphers ctos: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,3des-cbc,twofish256-ctr,twofish192-ctr,twofish128-ctr,twofish256-cbc,twofish192-cbc,twofish128-cbc,twofish-cbc,blowfish-ctr,blowfish-cbc,arcfour256,arcfour128 [preauth]
3808 2021-03-30 10:21:20.210 debug2: ciphers stoc: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,3des-cbc,twofish256-ctr,twofish192-ctr,twofish128-ctr,twofish256-cbc,twofish192-cbc,twofish128-cbc,twofish-cbc,blowfish-ctr,blowfish-cbc,arcfour256,arcfour128 [preauth]
3808 2021-03-30 10:21:20.210 debug2: MACs ctos: hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
3808 2021-03-30 10:21:20.210 debug2: MACs stoc: hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
3808 2021-03-30 10:21:20.210 debug2: compression ctos: none,zlib,zlib@openssh.com [preauth]
3808 2021-03-30 10:21:20.210 debug2: compression stoc: none,zlib,zlib@openssh.com [preauth]
3808 2021-03-30 10:21:20.210 debug2: languages ctos:  [preauth]
3808 2021-03-30 10:21:20.210 debug2: languages stoc:  [preauth]
3808 2021-03-30 10:21:20.210 debug2: first_kex_follows 0  [preauth]
3808 2021-03-30 10:21:20.210 debug2: reserved 0  [preauth]
3808 2021-03-30 10:21:20.210 debug1: kex: algorithm: diffie-hellman-group-exchange-sha256 [preauth]
3808 2021-03-30 10:21:20.210 debug1: kex: host key algorithm: rsa-sha2-256 [preauth]
3808 2021-03-30 10:21:20.210 debug1: kex: client->server cipher: aes256-ctr MAC: hmac-sha2-256 compression: none [preauth]
3808 2021-03-30 10:21:20.210 debug1: kex: server->client cipher: aes256-ctr MAC: hmac-sha2-256 compression: none [preauth]
3808 2021-03-30 10:21:20.210 debug1: expecting SSH2_MSG_KEX_DH_GEX_REQUEST [preauth]
3808 2021-03-30 10:21:20.225 debug3: receive packet: type 34 [preauth]
3808 2021-03-30 10:21:20.225 debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received [preauth]
3808 2021-03-30 10:21:20.225 debug3: mm_request_send entering: type 0 [preauth]
3808 2021-03-30 10:21:20.225 debug3: mm_choose_dh: waiting for MONITOR_ANS_MODULI [preauth]
3808 2021-03-30 10:21:20.225 debug3: mm_request_receive_expect entering: type 1 [preauth]
3808 2021-03-30 10:21:20.225 debug3: mm_request_receive entering [preauth]
3808 2021-03-30 10:21:20.225 debug3: mm_request_receive entering
3808 2021-03-30 10:21:20.225 debug3: monitor_read: checking request 0
3808 2021-03-30 10:21:20.225 debug3: mm_answer_moduli: got parameters: 2048 2048 4096
3808 2021-03-30 10:21:20.225 debug3: Failed to open file:C:/ProgramData/ssh/moduli error:2
3808 2021-03-30 10:21:20.225 WARNING: could not open __PROGRAMDATA__\\ssh/moduli (No such file or directory), using fixed modulus
3808 2021-03-30 10:21:20.225 debug3: dh_new_group_fallback: requested max size 4096
3808 2021-03-30 10:21:20.225 debug3: using 4k bit group 16
3808 2021-03-30 10:21:20.225 debug3: mm_request_send entering: type 1
3808 2021-03-30 10:21:20.225 debug2: monitor_read: 0 used once, disabling now
3808 2021-03-30 10:21:20.225 debug3: mm_choose_dh: remaining 0 [preauth]
3808 2021-03-30 10:21:20.225 debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent [preauth]
3808 2021-03-30 10:21:20.225 debug3: send packet: type 31 [preauth]
3808 2021-03-30 10:21:20.272 debug2: bits set: 2055/4096 [preauth]
3808 2021-03-30 10:21:20.272 debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT [preauth]
3808 2021-03-30 10:21:20.569 debug3: receive packet: type 32 [preauth]
3808 2021-03-30 10:21:20.569 debug2: bits set: 2050/4096 [preauth]
3808 2021-03-30 10:21:20.616 debug3: mm_sshkey_sign entering [preauth]
3808 2021-03-30 10:21:20.616 debug3: mm_request_send entering: type 6 [preauth]
3808 2021-03-30 10:21:20.616 debug3: mm_request_receive entering
3808 2021-03-30 10:21:20.616 debug3: monitor_read: checking request 6
3808 2021-03-30 10:21:20.616 debug3: mm_answer_sign
3808 2021-03-30 10:21:20.632 debug3: mm_answer_sign: KEX signature 0000017C5ECCB7E0(276)
3808 2021-03-30 10:21:20.632 debug3: mm_request_send entering: type 7
3808 2021-03-30 10:21:20.632 debug2: monitor_read: 6 used once, disabling now
3808 2021-03-30 10:21:20.632 debug3: mm_sshkey_sign: waiting for MONITOR_ANS_SIGN [preauth]
3808 2021-03-30 10:21:20.632 debug3: mm_request_receive_expect entering: type 7 [preauth]
3808 2021-03-30 10:21:20.632 debug3: mm_request_receive entering [preauth]
3808 2021-03-30 10:21:20.632 debug3: send packet: type 33 [preauth]
3808 2021-03-30 10:21:20.632 debug3: send packet: type 21 [preauth]
3808 2021-03-30 10:21:20.632 debug2: set_newkeys: mode 1 [preauth]
3808 2021-03-30 10:21:20.632 debug1: rekey out after 4294967296 blocks [preauth]
3808 2021-03-30 10:21:20.632 debug1: SSH2_MSG_NEWKEYS sent [preauth]
3808 2021-03-30 10:21:20.632 debug1: expecting SSH2_MSG_NEWKEYS [preauth]
3808 2021-03-30 10:21:20.944 debug3: receive packet: type 21 [preauth]
3808 2021-03-30 10:21:20.944 debug1: SSH2_MSG_NEWKEYS received [preauth]
3808 2021-03-30 10:21:20.944 debug2: set_newkeys: mode 0 [preauth]
3808 2021-03-30 10:21:20.944 debug1: rekey in after 4294967296 blocks [preauth]
3808 2021-03-30 10:21:20.944 debug1: KEX done [preauth]
3808 2021-03-30 10:21:20.944 debug3: receive packet: type 1 [preauth]
3808 2021-03-30 10:21:20.944 Received disconnect from 192.168.XXX.XXX port 57854:11: Session closed [preauth]
3808 2021-03-30 10:21:20.944 Disconnected from 192.168.XXX.XXX port 57854 [preauth]
3808 2021-03-30 10:21:20.944 debug1: do_cleanup [preauth]
3808 2021-03-30 10:21:20.944 debug3: mm_request_receive entering
3808 2021-03-30 10:21:20.944 debug1: do_cleanup
3808 2021-03-30 10:21:20.944 debug1: Killing privsep child 7008

 

Occasional Visitor

Experiencing a problem when running nano logged in remote to my server. The cursor is not updating its position at times, handling white space seems awkward with some glitches. When I run nano on the server logged into the console, it looks and behaves perfectly fine, the same way it has always performed for me on Fedora etc.

 

Could this have to do with the use of an incorrect version of OpenSSHUtils? The original command in the document failed for me, but the OpenSSHUtils 0.0.2.0 worked and installed.

Occasional Visitor

I have tried my all ways to install OpenSSH server, But not sure why its getting not installed. No issue on installing the Client, but OpenSSH server not getting installed. Anyone help me out to get the pre requisites to install the same in Windows 2019 servers.

Jithinaak_0-1623224376214.png

 

%3CLINGO-SUB%20id%3D%22lingo-sub-309540%22%20slang%3D%22en-US%22%3EInstalling%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309540%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EWhile%20I%E2%80%99ve%20never%20had%20a%20problem%20with%20PowerShell%20remoting%20for%20remote%20command%20line%20interaction%20with%20Windows%20Server%2C%20I%E2%80%99ve%20often%20found%20that%20it%20isn%E2%80%99t%20something%20that%20many%20systems%20administrators%2C%20especially%20those%20that%20work%20in%20heterogeneous%20environments%2C%20are%20entirely%20at%20ease%20with.%20I%E2%80%99ve%20lost%20count%20of%20the%20number%20of%20times%20that%20I%E2%80%99ve%20seen%20experienced%20admins%20RDP%20across%20to%20a%20box%20running%20Windows%20Server%20so%20that%20they%20can%20interact%20with%20the%20operating%20system%20through%20a%20command%20prompt.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EWindows%20Server%202019%20and%20the%20most%20recent%20version%20of%20Windows%2010%20include%20the%20ability%20to%20install%20both%20an%20SSH%20client%20and%20an%20SSH%20server.%20Because%20most%20of%20us%20work%20with%20heterogenous%20systems%2C%20we%20are%20familiar%20with%20SSH%E2%80%99ing%20into%20a%20server%20or%20device%20to%20perform%20admin%20tasks.%20Now%20that%20it%E2%80%99s%20available%20and%20easy%20to%20configure%20on%20Windows%20Server%202019%2C%20I%20find%20myself%20using%20SSH%2C%20rather%20than%20other%20remote%20connection%20methods%2C%20as%20my%20default%20method%20of%20remotely%20connecting%20to%20servers%2C%20be%20they%20proximate%20or%20running%20in%20Azure.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETo%20get%20an%20SSH%20client%20onto%20Windows%2010%20or%20Windows%20Server%202019%2C%20without%20using%203%3CSUP%3Erd%3C%2FSUP%3E%20party%20software%20or%20installing%20Windows%20Subsystem%20for%20Linux%2C%20use%20the%20PowerShell%20command%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EAdd-WindowsCapability%20-Online%20-Name%20OpenSSH.Client~~~~0.0.1.0%0A%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSPAN%3ETo%20add%20an%20SSH%20client%20and%20SSH%20server%20to%20Windows%20Server%202019%2C%20use%20the%20following%20PowerShell%20commands%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EAdd-WindowsCapability%20-Online%20-Name%20OpenSSH.Server~~~~0.0.1.0%0AAdd-WindowsCapability%20-Online%20-Name%20OpenSSH.Client~~~~0.0.1.0%0A%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSPAN%3EI%20have%20found%20it%20useful%20to%20add%20both%20client%20and%20server%20capability%20to%20Windows%20Server.%20This%20is%20also%20useful%20if%20the%20server%20will%20function%20a%20jump%20box.%20Once%20you%E2%80%99ve%20added%20the%20capability%2C%20you%20need%20to%20do%20a%20few%20things%20to%20get%20the%20SSH%20server%20working%20before%20you%E2%80%99re%20ready%20to%20go.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EIf%20you%E2%80%99re%20intending%20to%20use%20key%20based%2C%20rather%20than%20password%20based%2C%20authentication%2C%20you%20should%20also%20run%20the%20following%20command%20on%20the%20server%20to%20install%20an%20OpenSSH%20related%20PowerShell%20module%20that%20includes%20tools%20to%20help%20you%20configure%20that%20functionality%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EInstall-Module%20-Force%20OpenSSHUtils%20-Scope%20AllUsers%0A%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EI%20also%20recommend%20running%20the%20following%20PowerShell%20commands%20on%20the%20server%20to%20install%20the%20Nano%20text%20editor%2C%20which%20allows%20you%20to%20edit%20text%20files%20through%20an%20SSH%20session.%20If%20you%E2%80%99re%20going%20to%20use%20key%20based%20authentication%20rather%20than%20passwords%2C%20you%E2%80%99ll%20need%20to%20edit%20one%20of%20the%20config%20files%20(I%E2%80%99ll%20explain%20what%20you%20need%20to%20do%20a%20little%20later%20in%20the%20article)%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESet-ExecutionPolicy%20Bypass%0AIwr%20https%3A%2F%2Fchocolatey.org%2Finstall.ps1%20-UseBasicParsing%20%7C%20iex%0Achoco%20install%20nano%20-y%0A%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EThe%20next%20thing%20you%E2%80%99ll%20need%20to%20do%20on%20your%20server%20is%20to%20configure%20the%20disabled%20ssh-agent%20service%20to%20automatically%20start%20and%20also%20configure%20the%20sshd%20service%20to%20automatically%20start.%20To%20do%20this%2C%20run%20the%20following%20PowerShell%20commands%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESet-Service%20-Name%20ssh-agent%20-StartupType%20%E2%80%98Automatic%E2%80%99%0ASet-Service%20-Name%20sshd%20-StartupType%20%E2%80%98Automatic%E2%80%99%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EThe%20final%20step%20in%20getting%20SSH%20running%20on%20Windows%20Server%202019%20is%20to%20run%20the%20following%20commands%20to%20start%20the%20relevant%20services%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EStart-Service%20ssh-agent%0AStart-Service%20sshd%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EIf%20you%20do%20all%20of%20this%2C%20you%E2%80%99ll%20be%20able%20to%20connect%20using%20password%20passed%20authentication%20from%20an%20SSH%20client%20using%20the%20syntax%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Essh%20username%40hostname_or_IP_address%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EIf%20you%E2%80%99re%20connecting%20to%20a%20domain%20account%20the%20format%20is%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Essh%20username%40domain%40hostname_or_IP_address%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EThe%20reality%20of%20SSH%20is%20that%20the%20vast%20majority%20of%20people%20that%20use%20it%2C%20use%20key%20based%20authentication%20rather%20than%20password%20based%20authentication.%20To%20get%20key%20based%20authentication%20working%20with%20Windows%20Server%202019%E2%80%99s%20SSH%20server%2C%20you%E2%80%99ll%20need%20to%20the%20following%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EOn%20the%20client%20change%20to%20the%20.ssh%20directory%20and%20run%20the%20command%20ssh-keygen%20accepting%20the%20defaults%20(you%20can%20change%20the%20name%20of%20the%20keys%20and%20provide%20a%20key%20password%20if%20you%20really%20want%20to%2C%20but%20that%E2%80%99s%20beyond%20the%20scope%20of%20this%20article)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ECd%20~%5C.ssh%5C%0ASsh-keygen%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EDoing%20this%20with%20the%20default%20values%20will%20create%20a%20public%20and%20private%20key.%20The%20private%20key%20will%20be%20id_rsa%20and%20the%20public%20key%20will%20be%20id_rsa.pub.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20next%20thing%20you%20should%20do%20is%20add%20your%20private%20key%20to%20your%20Windows%20security%20context.%20You%20can%20do%20this%20by%20running%20the%20following%20three%20commands%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESet-Service%20ssh-agent%20-StartupType%20%E2%80%98Automatic%E2%80%99%0AStart-service%20ssh-agent%0ASsh-add%20~%5C.ssh%5Cid_rsa%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EOnce%20you%E2%80%99ve%20done%20this%2C%20you%E2%80%99ll%20want%20to%20deploy%20your%20public%20key%20to%20the%20Windows%20Server%202019%20server%20that%20you%20want%20to%20use%20SSH%20key%20based%20authentication%20with.%20To%20do%20this%2C%20perform%20the%20following%20steps%20(where%20chancellor%20is%20the%20name%20of%20the%20user%20account%20you%E2%80%99re%20configuring%20SSH%20key%20based%20authentication%20for)%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESsh%20chancellor%40172.16.0.15%20mkdir%20c%3A%5Cusers%5Cchancellor%5C.ssh%5C%0AScp%20c%3A%5Cusers%5Cchancellor%5C.ssh%5Cid_rsa.pub%20chancellor%40172.16.0.15%3AC%3A%5CUsers%5CAdministrator%5C.ssh%5Cauthorized_keys%0A%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EYou%E2%80%99ll%20then%20need%20to%20run%20the%20following%20PowerShell%20command%2C%20located%20in%20that%20OpenSSHUtils%20PowerShell%20module%20I%20mentioned%20earlier%2C%20to%20configure%20some%20of%20the%20permissions%20for%20the%20authorized%20keys%20file.%20You%20might%20even%20want%20to%20SSH%20across%20to%20the%20server%20using%20password%20based%20authentication%20to%20do%20this%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ERepair-AuthorizedKeyPermission%20C%3A%5Cusers%5CChancellor%5C.ssh%5Cauthorized_keys%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EBecause%20the%20PowerShell%20cmdlet%20doesn%E2%80%99t%20entirely%20work%20as%20it%20should%2C%20you%E2%80%99ll%20also%20need%20to%20run%20the%20following%20command%20as%20%E2%80%9CNT%20SERVICE%5Csshd%E2%80%9D%20should%20not%20have%20any%20permissions%20to%20the%20authorized_keys%20file%20(if%20it%20does%2C%20key%20based%20authentication%20doesn%E2%80%99t%20seem%20to%20work)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EIcacls%20authorized_keys%20%2Fremove%20%E2%80%9CNT%20SERVICE%5Csshd%E2%80%9D%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EThe%20final%20step%20you%E2%80%99ll%20need%20to%20take%20requires%20you%20to%20edit%20the%20c%3A%5CProgramData%5Cssh%5Csshd_config%20file%2C%20which%20you%20can%20do%20using%20the%20nano%20text%20editor%20and%20comment%20out%20the%20following%20lines%20(which%20are%20at%20the%20end%20of%20the%20file)%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%23%20Match%20Group%20administrators%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%23%20%20%20%20%20%20%20AuthorizedKeysFile%20__PROGRAMDATA__%2Fssh%2Fadministrators_authorized_keys%20%0A%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EYou%20may%20need%20to%20do%20this%20locally%20on%20the%20Windows%20Server%202019%20box.%20Once%20this%20is%20done%2C%20you%20can%20restart%20the%20sshd%20service%20(restart-service%20sshd)%20and%20you%20will%20be%20able%20to%20connect%20from%20your%20client%20using%20key%20based%20authentication.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EIf%20you%20want%20to%20learn%20about%20advanced%20configuration%20options%20for%20OpenSSH%20server%20on%20Windows%20Server%202019%2C%20consult%20the%20following%20article%3A%20%3CA%20class%3D%22yt-simple-endpoint%20style-scope%20yt-formatted-string%22%20spellcheck%3D%22false%22%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fredirect%3Fq%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fwindows-server%252Fadministration%252Fopenssh%252Fopenssh_server_configuration%253FWT.mc_id%253Dsocial-twitter-orthomas%26amp%3Bredir_token%3Dk4V5-Fo4e1ClCjAYKVeDXkYmAnt8MTU1NTY3MTYzNEAxNTU1NTg1MjM0%26amp%3Bstzid%3DUgzl70dnUYhIxyIMv7B4AaABAg.8tqXW1FO3CR8trk8Vauu56%26amp%3Bevent%3Dcomments%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-server%2Fadministration%2Fopenssh%2Fopenssh_server_configuration%3FWT.mc_id%3DITOPSTALK-blog-orthomas%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F64984i00FF556523F8810F%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22Windows_Server_2019_OpenSSH.jpg%22%20title%3D%22Windows_Server_2019_OpenSSH.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-309540%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20this%20article%20you'll%20learn%20how%20to%20install%20and%20configure%20the%20OpenSSH%20Server%20on%20Windows%20Server%202019%20and%20configure%20authentication%20to%20work%20using%20passwords%20and%20keys.%20You'll%20also%20learn%20how%20to%20configure%20OpenSSH%20client%20on%20Windows%2010%20to%20authenticate%20with%20an%20SSH%20server%20using%20keys.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F64983i9F8027C8DF0C2F5C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Windows_Server_2019_OpenSSH.jpg%22%20title%3D%22Windows_Server_2019_OpenSSH.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-309540%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-470829%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-470829%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20also%20posted%20a%20version%20of%20this%20on%20YouTube%3C%2FP%3E%0A%3CP%3E%3CIFRAME%20src%3D%22https%3A%2F%2Fwww.youtube.com%2Fembed%2FCs3wBl_mMH0%22%20allowfullscreen%3D%22allowfullscreen%22%20allow%3D%22accelerometer%3B%20autoplay%3B%20encrypted-media%3B%20gyroscope%3B%20picture-in-picture%22%20width%3D%22560%22%20height%3D%22315%22%20frameborder%3D%220%22%3E%3C%2FIFRAME%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-645789%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-645789%22%20slang%3D%22en-US%22%3E%3CP%3ENice%20Doc!%3CBR%20%2F%3ESuper%20to%20the%20point%20and%20easy%20to%20read.%3CBR%20%2F%3EI%20appreciate%20your%20contributions!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-784852%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-784852%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%2C%26nbsp%3B%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F251291%22%20target%3D%22_blank%22%3E%40OrinThomas%3C%2FA%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EYour%20instructions%20worked%26nbsp%3B%3C%2FSPAN%3Eperfectly%20even%20at%20the%20end%20where%20you%20instructed%20us%20to%20go%20back%20and%20set%20proper%20permissions%20for%20the%20server%20side%20authorized%20keys%20and%20also%20to%20comment%20out%20the%20two%20lines%20in%20the%20server%20side%26nbsp%3B%3CSPAN%3Ec%3A%5CProgramData%5Cssh%5Csshd_config%20at%20the%20end.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20had%20followed%20the%20Microsoft%26nbsp%3BDocs%20documentation%20but%20they%20left%20the%20last%20two%20parts%20out%20and%20it%20would%20not%20work.%20The%20documentation%20needs%20to%20be%20updated%20on%20the%20site%3A%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-server%2Fadministration%2Fopenssh%2Fopenssh_keymanagement%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-server%2Fadministration%2Fopenssh%2Fopenssh_keymanagement%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAnyway%2C%20your%20article%20was%20complete%20and%20you%20are%26nbsp%3B%3C%2FSPAN%3Eproperly%20methodical%20and%20I%20thank%20you.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-906775%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-906775%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20run%20the%20command%20similar%20to%20(swapping%20the%20my%20user%20account%20for%20Chancellor)%3C%2FP%3E%3CPRE%3ERepair-AuthorizedKeyPermission%20C%3A%5Cusers%5CChancellor%5C.ssh%5Cauthorized_keys%3C%2FPRE%3E%3CP%3EI%20receive%20the%20message%3A%3C%2FP%3E%3CP%3E(location)%26nbsp%3Bis%20not%20in%20the%20profile%20folder%20of%20any%20user.%20Skip%20checking...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20thoughts%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-935820%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-935820%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F251291%22%20target%3D%22_blank%22%3E%40OrinThomas%3C%2FA%3E%26nbsp%3B%2C%20a%20very%20useful%20report.%3C%2FP%3E%3CP%3EI%20needed%20a%20sftp%20server%20in%20mode%20chroot%20jail.%20So%2C%20I%20added%20the%20next%20lines%20to%20the%20file%20sshd_config%2C%20for%20that%20purpose%20.%26nbsp%3BHere%20is%20the%20information%20for%20anyone%20who%20need%20it.%3C%2FP%3E%3CPRE%3EPermitTTY%20no%0AChrootDirectory%20C%3A%2Fmy_path_for_root_sftp%2F%25u%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1316153%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1316153%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20missed%20a%20step%20to%20restart%20the%20sshd%20service%20after%20updating%20the%26nbsp%3B%3CSPAN%3E%26nbsp%3Bc%3A%5CProgramData%5Cssh%5Csshd_config%20file.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1319984%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1319984%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22lia-message-author-with-avatar%22%3E%3CSPAN%20class%3D%22UserName%20lia-user-name%20lia-user-rank-Visitor%20lia-component-message-view-widget-author-username%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F262379%22%20target%3D%22_blank%22%3E%40emoldes%3C%2FA%3E%26nbsp%3B%3C%2FSPAN%3Ethat's%20exactly%20what%20I%20was%20looking%20for%20but%20it%20doesn't%20work%20on%20Windows.%26nbsp%3BThis%26nbsp%3BChrootDirectory%20with%20%2F%25u%20this%20format%20is%20for%20Linux%2C%20right%3F%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-author-with-avatar%22%3EI%20want%20that%20each%20user%20who%20SFTP%20to%20the%20server%20goes%20to%20his%20unique%20home%20folder%20and%20on%20Linux%20you%20can%20use%20ChrootDirectory%20C%3A%2FPATH_to_root_folder%2F%25u%20but%20in%20window%20you%20can%20setup%20only%26nbsp%3BChrootDirectory%20C%3A%5CPATH_to_root_folder%5C.%20If%20that's%20not%20correct%20can%20someone%20tell%20me%20solution%20for%20OpenSSH%20on%20Windows%20server.%20thanks.%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-author-with-avatar%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1352486%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1352486%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F628394%22%20target%3D%22_blank%22%3E%40puscavnik%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20configuration%20for%20ChrootDirectory%20works%20ok.%20Here%20you%20are%20an%20example%20that%20I%20usually%20use.%20I%20hope%20this%20helps%20you.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22emoldes_0-1588334408477.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F188159iEFD286077FC42D99%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22emoldes_0-1588334408477.png%22%20alt%3D%22emoldes_0-1588334408477.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1532518%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1532518%22%20slang%3D%22en-US%22%3E%3CP%3Enot%20able%20to%20install%20opensshpsutils%20module%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1681291%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1681291%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20struggled%20with%20the%20installation%20of%20OpenSSHUtils%20too%3C%2FP%3E%3CP%3Eto%20solve%20this%20I%20have%20installed%20it%20using%20the%20following.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EInstall-Module%20-Name%20OpenSSHUtils%20-RequiredVersion%200.0.2.0%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2209140%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2209140%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20to%20browse%20and%20view%20the%20different%20versions%20available%20to%20install%3F%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3Edhbcub%3A%20you%20used%20RequiredVersion%200.0.2.0%20which%20is%20different%20from%20what%26nbsp%3B%3CSPAN%20class%3D%22UserName%20lia-user-name%20lia-user-rank-Microsoft%20lia-component-message-view-widget-author-username%22%3E%3CSPAN%20class%3D%22%22%3EOrinThomas%3C%2FSPAN%3E%26nbsp%3Bused.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%20class%3D%22UserName%20lia-user-name%20lia-user-rank-Microsoft%20lia-component-message-view-widget-author-username%22%3EIf%20I%20run%20the%20%22Get-Module%20-ListAvailable%22%20Or%20%22Get-Module%20-All%22%20I%20do%20get%20a%20list%20of%20items%20but%20OpenSSH%20is%20not%20listed%20anywhere.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2244534%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2244534%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20use%20OpenSSH(7.7%20%26amp%3B%208.1)%20OS%3A%20Windows%20Server%202019%20Standard.%3C%2FP%3E%3CP%3EFrom%20time%20to%20time%2C%20the%20service%20hangs%20-%20although%20the%20state%20of%20the%20service%20is%20running%20(in%20service%20management)%2C%3C%2FP%3E%3CP%3Eit%20stops%20listening%20on%20port%2022.%3C%2FP%3E%3CP%3EIn%20some%20cases%2C%20when%20trying%20to%20connect%20using%20telnet%2C%20we%20get%20a%20%22black%20screen%22%20without%20the%20local%20version%20string%2C%3C%2FP%3E%3CP%3Ein%20other%20cases%2C%20telnet%20cannot%20connect%20at%20all.%20This%20can%20happen%20after%20a%20random%20time.%3C%2FP%3E%3CP%3EAfter%20restarting%20the%20service%2C%20it%20works%20normally.%3C%2FP%3E%3CP%3EPlease%20find%20the%20configuration%20file%20and%20the%20related%20part%20of%20log%20below.%3C%2FP%3E%3CP%3EThank%20you%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EConfiguration%20file%20%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%23%20Logging%0ASyslogFacility%20LOCAL0%0ALogLevel%20DEBUG3%0A%0A%23%20Authentication%3A%0APermitRootLogin%20prohibit-password%0AStrictModes%20yes%0A%0APubkeyAuthentication%20no%0A%0AAuthorizedKeysFile%20.ssh%2Fauthorized_keys%0A%0A%23%20To%20disable%20tunneled%20clear%20text%20passwords%2C%20change%20to%20no%20here!%0APasswordAuthentication%20yes%0A%0AAllowTcpForwarding%20no%0A%0A%23%20override%20default%20of%20no%20subsystems%0ASubsystem%20sftp%20sftp-server.exe%20%0A%0AMatch%20User%20Upload031%0A%20%20%20%20ChrootDirectory%20D%3A%5CSFTP%5CUpload031%0A%20%0AMatch%20User%20Upload032%0A%20%20%20%20ChrootDirectory%20D%3A%5CSFTP%5CUpload032%0A%20%0AMatch%20User%20Upload033%0A%20%20%20%20ChrootDirectory%20D%3A%5CSFTP%5CUpload033%0A%20%0AMatch%20User%20Upload034%0A%20%20%20%20ChrootDirectory%20D%3A%5CSFTP%5CUpload034%0A%20%0AMatch%20User%20Upload035%0A%20%20%20%20ChrootDirectory%20D%3A%5CSFTP%5CUpload035%0A%20%0AMatch%20User%20Upload036%0A%20%20%20%20ChrootDirectory%20D%3A%5CSFTP%5CUpload036%0A%20%0AMatch%20User%20Upload037%0A%20%20%20%20ChrootDirectory%20D%3A%5CSFTP%5CUpload037%0A%20%0AMatch%20all%0A%20%20%20%20ChrootDirectory%20D%3A%5Csftp_dump%5C%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELog%20%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E6152%202021-03-30%2010%3A21%3A19.913%20debug3%3A%20fd%205%20is%20not%20O_NONBLOCK%0A6152%202021-03-30%2010%3A21%3A19.913%20debug3%3A%20spawning%20%22C%3A%5C%5Copenssh%5C%5Csshd.exe%22%20-R%0A6152%202021-03-30%2010%3A21%3A19.913%20debug3%3A%20send_rexec_state%3A%20entering%20fd%20%3D%208%20config%20len%205262%0A6152%202021-03-30%2010%3A21%3A19.913%20debug3%3A%20ssh_msg_send%3A%20type%200%0A6152%202021-03-30%2010%3A21%3A19.944%20debug3%3A%20send_rexec_state%3A%20done%0A7984%202021-03-30%2010%3A21%3A19.975%20debug1%3A%20inetd%20sockets%20after%20dupping%3A%204%2C%204%0A7984%202021-03-30%2010%3A21%3A19.975%20Connection%20from%20192.168.XXX.XXX%20port%2057853%20on%2010.XXX.XXX.XXX%20port%2022%0A7984%202021-03-30%2010%3A21%3A19.975%20debug1%3A%20Local%20version%20string%20SSH-2.0-OpenSSH_for_Windows_8.1%0A7984%202021-03-30%2010%3A21%3A19.975%20error%3A%20kex_exchange_identification%3A%20Connection%20closed%20by%20remote%20host%0A6152%202021-03-30%2010%3A21%3A19.991%20debug3%3A%20fd%205%20is%20not%20O_NONBLOCK%0A6152%202021-03-30%2010%3A21%3A19.991%20debug3%3A%20spawning%20%22C%3A%5C%5Copenssh%5C%5Csshd.exe%22%20-R%0A6152%202021-03-30%2010%3A21%3A20.007%20debug3%3A%20send_rexec_state%3A%20entering%20fd%20%3D%209%20config%20len%205262%0A6152%202021-03-30%2010%3A21%3A20.007%20debug3%3A%20ssh_msg_send%3A%20type%200%0A3808%202021-03-30%2010%3A21%3A20.053%20debug1%3A%20inetd%20sockets%20after%20dupping%3A%204%2C%204%0A3808%202021-03-30%2010%3A21%3A20.053%20Connection%20from%20192.168.XXX.XXX%20port%2057854%20on%2010.XXX.XXX.XXX%20port%2022%0A3808%202021-03-30%2010%3A21%3A20.053%20debug1%3A%20Local%20version%20string%20SSH-2.0-OpenSSH_for_Windows_8.1%0A3808%202021-03-30%2010%3A21%3A20.053%20debug1%3A%20Remote%20protocol%20version%202.0%2C%20remote%20software%20version%20RebexSSH_1.0.6264.1%0A3808%202021-03-30%2010%3A21%3A20.053%20debug1%3A%20no%20match%3A%20RebexSSH_1.0.6264.1%0A3808%202021-03-30%2010%3A21%3A20.053%20debug2%3A%20fd%204%20setting%20O_NONBLOCK%0A3808%202021-03-30%2010%3A21%3A20.163%20debug3%3A%20spawning%20%22C%3A%5C%5Copenssh%5C%5Csshd.exe%22%20-y%0A3808%202021-03-30%2010%3A21%3A20.163%20debug2%3A%20Network%20child%20is%20on%20pid%207008%0A3808%202021-03-30%2010%3A21%3A20.163%20debug3%3A%20send_rexec_state%3A%20entering%20fd%20%3D%206%20config%20len%205262%0A3808%202021-03-30%2010%3A21%3A20.163%20debug3%3A%20ssh_msg_send%3A%20type%200%0A3808%202021-03-30%2010%3A21%3A20.210%20debug3%3A%20send_rexec_state%3A%20done%0A3808%202021-03-30%2010%3A21%3A20.210%20debug3%3A%20ssh_msg_send%3A%20type%200%0A3808%202021-03-30%2010%3A21%3A20.210%20debug3%3A%20ssh_msg_send%3A%20type%200%0A3808%202021-03-30%2010%3A21%3A20.210%20debug3%3A%20preauth%20child%20monitor%20started%0A3808%202021-03-30%2010%3A21%3A20.210%20debug1%3A%20list_hostkey_types%3A%20rsa-sha2-512%2Crsa-sha2-256%2Cssh-rsa%2Cecdsa-sha2-nistp256%2Cssh-ed25519%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug3%3A%20send%20packet%3A%20type%2020%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug1%3A%20SSH2_MSG_KEXINIT%20sent%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug3%3A%20receive%20packet%3A%20type%2020%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug1%3A%20SSH2_MSG_KEXINIT%20received%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20local%20server%20KEXINIT%20proposal%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20KEX%20algorithms%3A%20curve25519-sha256%2Ccurve25519-sha256%40libssh.org%2Cecdh-sha2-nistp256%2Cecdh-sha2-nistp384%2Cecdh-sha2-nistp521%2Cdiffie-hellman-group-exchange-sha256%2Cdiffie-hellman-group16-sha512%2Cdiffie-hellman-group18-sha512%2Cdiffie-hellman-group14-sha256%2Cdiffie-hellman-group14-sha1%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20host%20key%20algorithms%3A%20rsa-sha2-512%2Crsa-sha2-256%2Cssh-rsa%2Cecdsa-sha2-nistp256%2Cssh-ed25519%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20ciphers%20ctos%3A%20chacha20-poly1305%40openssh.com%2Caes128-ctr%2Caes192-ctr%2Caes256-ctr%2Caes128-gcm%40openssh.com%2Caes256-gcm%40openssh.com%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20ciphers%20stoc%3A%20chacha20-poly1305%40openssh.com%2Caes128-ctr%2Caes192-ctr%2Caes256-ctr%2Caes128-gcm%40openssh.com%2Caes256-gcm%40openssh.com%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20MACs%20ctos%3A%20umac-64-etm%40openssh.com%2Cumac-128-etm%40openssh.com%2Chmac-sha2-256-etm%40openssh.com%2Chmac-sha2-512-etm%40openssh.com%2Chmac-sha1-etm%40openssh.com%2Cumac-64%40openssh.com%2Cumac-128%40openssh.com%2Chmac-sha2-256%2Chmac-sha2-512%2Chmac-sha1%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20MACs%20stoc%3A%20umac-64-etm%40openssh.com%2Cumac-128-etm%40openssh.com%2Chmac-sha2-256-etm%40openssh.com%2Chmac-sha2-512-etm%40openssh.com%2Chmac-sha1-etm%40openssh.com%2Cumac-64%40openssh.com%2Cumac-128%40openssh.com%2Chmac-sha2-256%2Chmac-sha2-512%2Chmac-sha1%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20compression%20ctos%3A%20none%2Czlib%40openssh.com%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20compression%20stoc%3A%20none%2Czlib%40openssh.com%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20languages%20ctos%3A%20%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20languages%20stoc%3A%20%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20first_kex_follows%200%20%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20reserved%200%20%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20peer%20client%20KEXINIT%20proposal%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20KEX%20algorithms%3A%20diffie-hellman-group-exchange-sha256%2Cdiffie-hellman-group14-sha256%2Cdiffie-hellman-group15-sha512%2Cdiffie-hellman-group16-sha512%2Cdiffie-hellman-group-exchange-sha1%2Cdiffie-hellman-group14-sha1%2Cecdh-sha2-nistp256%2Cecdh-sha2-nistp384%2Cecdh-sha2-nistp521%2Cdiffie-hellman-group1-sha1%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20host%20key%20algorithms%3A%20ssh-dss%2Crsa-sha2-256%2Cssh-rsa-sha256%40ssh.com%2Crsa-sha2-512%2Cssh-rsa%2Cx509v3-sign-rsa-sha256%40ssh.com%2Cx509v3-sign-rsa%2Cx509v3-sign-dss%2Cecdsa-sha2-nistp256%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20ciphers%20ctos%3A%20aes256-ctr%2Caes192-ctr%2Caes128-ctr%2Caes256-cbc%2Caes192-cbc%2Caes128-cbc%2C3des-ctr%2C3des-cbc%2Ctwofish256-ctr%2Ctwofish192-ctr%2Ctwofish128-ctr%2Ctwofish256-cbc%2Ctwofish192-cbc%2Ctwofish128-cbc%2Ctwofish-cbc%2Cblowfish-ctr%2Cblowfish-cbc%2Carcfour256%2Carcfour128%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20ciphers%20stoc%3A%20aes256-ctr%2Caes192-ctr%2Caes128-ctr%2Caes256-cbc%2Caes192-cbc%2Caes128-cbc%2C3des-ctr%2C3des-cbc%2Ctwofish256-ctr%2Ctwofish192-ctr%2Ctwofish128-ctr%2Ctwofish256-cbc%2Ctwofish192-cbc%2Ctwofish128-cbc%2Ctwofish-cbc%2Cblowfish-ctr%2Cblowfish-cbc%2Carcfour256%2Carcfour128%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20MACs%20ctos%3A%20hmac-sha2-256%2Chmac-sha2-512%2Chmac-sha1%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20MACs%20stoc%3A%20hmac-sha2-256%2Chmac-sha2-512%2Chmac-sha1%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20compression%20ctos%3A%20none%2Czlib%2Czlib%40openssh.com%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20compression%20stoc%3A%20none%2Czlib%2Czlib%40openssh.com%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20languages%20ctos%3A%20%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20languages%20stoc%3A%20%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20first_kex_follows%200%20%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug2%3A%20reserved%200%20%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug1%3A%20kex%3A%20algorithm%3A%20diffie-hellman-group-exchange-sha256%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug1%3A%20kex%3A%20host%20key%20algorithm%3A%20rsa-sha2-256%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug1%3A%20kex%3A%20client-%26gt%3Bserver%20cipher%3A%20aes256-ctr%20MAC%3A%20hmac-sha2-256%20compression%3A%20none%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug1%3A%20kex%3A%20server-%26gt%3Bclient%20cipher%3A%20aes256-ctr%20MAC%3A%20hmac-sha2-256%20compression%3A%20none%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.210%20debug1%3A%20expecting%20SSH2_MSG_KEX_DH_GEX_REQUEST%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20receive%20packet%3A%20type%2034%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.225%20debug1%3A%20SSH2_MSG_KEX_DH_GEX_REQUEST%20received%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20mm_request_send%20entering%3A%20type%200%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20mm_choose_dh%3A%20waiting%20for%20MONITOR_ANS_MODULI%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20mm_request_receive_expect%20entering%3A%20type%201%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20mm_request_receive%20entering%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20mm_request_receive%20entering%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20monitor_read%3A%20checking%20request%200%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20mm_answer_moduli%3A%20got%20parameters%3A%202048%202048%204096%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20Failed%20to%20open%20file%3AC%3A%2FProgramData%2Fssh%2Fmoduli%20error%3A2%0A3808%202021-03-30%2010%3A21%3A20.225%20WARNING%3A%20could%20not%20open%20__PROGRAMDATA__%5C%5Cssh%2Fmoduli%20(No%20such%20file%20or%20directory)%2C%20using%20fixed%20modulus%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20dh_new_group_fallback%3A%20requested%20max%20size%204096%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20using%204k%20bit%20group%2016%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20mm_request_send%20entering%3A%20type%201%0A3808%202021-03-30%2010%3A21%3A20.225%20debug2%3A%20monitor_read%3A%200%20used%20once%2C%20disabling%20now%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20mm_choose_dh%3A%20remaining%200%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.225%20debug1%3A%20SSH2_MSG_KEX_DH_GEX_GROUP%20sent%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.225%20debug3%3A%20send%20packet%3A%20type%2031%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.272%20debug2%3A%20bits%20set%3A%202055%2F4096%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.272%20debug1%3A%20expecting%20SSH2_MSG_KEX_DH_GEX_INIT%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.569%20debug3%3A%20receive%20packet%3A%20type%2032%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.569%20debug2%3A%20bits%20set%3A%202050%2F4096%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.616%20debug3%3A%20mm_sshkey_sign%20entering%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.616%20debug3%3A%20mm_request_send%20entering%3A%20type%206%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.616%20debug3%3A%20mm_request_receive%20entering%0A3808%202021-03-30%2010%3A21%3A20.616%20debug3%3A%20monitor_read%3A%20checking%20request%206%0A3808%202021-03-30%2010%3A21%3A20.616%20debug3%3A%20mm_answer_sign%0A3808%202021-03-30%2010%3A21%3A20.632%20debug3%3A%20mm_answer_sign%3A%20KEX%20signature%200000017C5ECCB7E0(276)%0A3808%202021-03-30%2010%3A21%3A20.632%20debug3%3A%20mm_request_send%20entering%3A%20type%207%0A3808%202021-03-30%2010%3A21%3A20.632%20debug2%3A%20monitor_read%3A%206%20used%20once%2C%20disabling%20now%0A3808%202021-03-30%2010%3A21%3A20.632%20debug3%3A%20mm_sshkey_sign%3A%20waiting%20for%20MONITOR_ANS_SIGN%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.632%20debug3%3A%20mm_request_receive_expect%20entering%3A%20type%207%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.632%20debug3%3A%20mm_request_receive%20entering%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.632%20debug3%3A%20send%20packet%3A%20type%2033%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.632%20debug3%3A%20send%20packet%3A%20type%2021%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.632%20debug2%3A%20set_newkeys%3A%20mode%201%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.632%20debug1%3A%20rekey%20out%20after%204294967296%20blocks%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.632%20debug1%3A%20SSH2_MSG_NEWKEYS%20sent%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.632%20debug1%3A%20expecting%20SSH2_MSG_NEWKEYS%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20debug3%3A%20receive%20packet%3A%20type%2021%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20debug1%3A%20SSH2_MSG_NEWKEYS%20received%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20debug2%3A%20set_newkeys%3A%20mode%200%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20debug1%3A%20rekey%20in%20after%204294967296%20blocks%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20debug1%3A%20KEX%20done%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20debug3%3A%20receive%20packet%3A%20type%201%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20Received%20disconnect%20from%20192.168.XXX.XXX%20port%2057854%3A11%3A%20Session%20closed%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20Disconnected%20from%20192.168.XXX.XXX%20port%2057854%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20debug1%3A%20do_cleanup%20%5Bpreauth%5D%0A3808%202021-03-30%2010%3A21%3A20.944%20debug3%3A%20mm_request_receive%20entering%0A3808%202021-03-30%2010%3A21%3A20.944%20debug1%3A%20do_cleanup%0A3808%202021-03-30%2010%3A21%3A20.944%20debug1%3A%20Killing%20privsep%20child%207008%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315605%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315605%22%20slang%3D%22en-US%22%3E%3CP%3EExperiencing%20a%20problem%20when%20running%20nano%20logged%20in%20remote%20to%20my%20server.%20The%20cursor%20is%20not%20updating%20its%20position%20at%20times%2C%20handling%20white%20space%20seems%20awkward%20with%20some%20glitches.%20When%20I%20run%20nano%20on%20the%20server%20logged%20into%20the%20console%2C%20it%20looks%20and%20behaves%20perfectly%20fine%2C%20the%20same%20way%20it%20has%20always%20performed%20for%20me%20on%20Fedora%20etc.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20this%20have%20to%20do%20with%20the%20use%20of%20an%20incorrect%20version%20of%20OpenSSHUtils%3F%20The%20original%20command%20in%20the%20document%20failed%20for%20me%2C%20but%20the%20OpenSSHUtils%200.0.2.0%20worked%20and%20installed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2429688%22%20slang%3D%22en-US%22%3ERe%3A%20Installing%20and%20Configuring%20OpenSSH%20on%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2429688%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20tried%20my%20all%20ways%20to%20install%20OpenSSH%20server%2C%20But%20not%20sure%20why%20its%20getting%20not%20installed.%20No%20issue%20on%20installing%20the%20Client%2C%20but%20OpenSSH%20server%20not%20getting%20installed.%20Anyone%20help%20me%20out%20to%20get%20the%20pre%20requisites%20to%20install%20the%20same%20in%20Windows%202019%20servers.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jithinaak_0-1623224376214.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287407i435BFDCEB9A84FB8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Jithinaak_0-1623224376214.png%22%20alt%3D%22Jithinaak_0-1623224376214.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Version history
Last update:
‎Apr 18 2019 04:02 AM
Updated by: