Windows Server 2019 has a built-in OpenSSH Server component. OpenSSH Server is an optional feature by default, and it also needs to be installed before it can be used. Today we will share how to install OpenSSH Server remote management components for Windows Server 2019 by running PowerShell commands.
Press both the Win+X key to pop up the system shortcut menu, select "Windows PowerShell (Admin)," and select Enter in the opened "Administrator: Windows PowerShell" window to run the following command:
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
According to the returned prompt information, the installation will start automatically without restarting the system. Windows Server 2019 will automatically add OpenSSH Server to the firewall allowed list. Next, continue to run the following commands to start the sshd and ssh-agent services . Finally, set them to start automatically.
Please refer to the following for the order of the commands :
Set-Service sshd -StartupType Automatic
Set-Service ssh-agent -StartupType Automatic
Modify the sshd_config file, the file address: C:\ProgramData\ssh
Turn on the password verification and remove the [#] in front，then save the file.
Use a Password for SSH Connection
Win key + R, enter CMD or choose to download the CMD file in the cloud server console's SSH connection mode, open the CMD window, and use the SSH command to connect to your host.
Then enter [email protected]'s password: Set your password. The password will not be displayed when you enter it. If [root@VM-2b9b6653-1a87-4241-ab90-783051d708c3 ~]# appears, it means that you have login successfully. Please refer to the following graph.
May You Are Interested in: