Installing and configuring OpenSSH with public key authentication on Windows
For the
Cyber Recovery deployment to support the NetWorker application for Windows, install and then configure OpenSSH.
Prerequisites
A Windows host is installed in the
Cyber Recovery vault.
About this task
To be able add the NetWorker application for Windows to the
Cyber Recovery deployment, OpenSSH must be installed on the Windows host in the
Cyber Recovery vault. You can perform this procedure at any time. However, if you install the
Cyber Recovery software before installing OpeSSH, you will be unable to add the NetWorker application for Windows.
NOTE
If your Windows host is running:
Windows 2016, then you must install OpenSSH manually
Windows 2019, OpenSSH is included and you must enable it
Steps
Open a PowerShell session on the Windows host.
Create a temporary folder in which to download the OpenSSH binaries:
Start the
sshd service to create the template file to configure the
sshd service:
start-service sshd
The
c:\ProgramData\ssh folder is created and contains the
sshd_config file and template file for the private and public key.
Edit the
sshd_config file and set the public key authentication to
yes:
((Get-Content -path C:\ProgramData\ssh\sshd_config -Raw) -replace '#PubkeyAuthentication yes', 'PubkeyAuthentication yes' -replace 'Match Group administrators','#Match Group administrators') | Set-Content -Path C:\ProgramData\ssh\sshd_config
Start the
sshd service again so that the changes to the
sshd_config file are in effect:
Restart-Service sshd
To verify that the SSH server is configured correctly, connect to the server from another Linux host using the
ssh Administrator@<yourWindowshost> command. You are prompted to enter your password.
Set the default logging shell from Command Prompt to PowerShell: