Windows Server
Window server monitor uses SSH to collect data.
Note
∞ Enabling SSH on Windows Servers
- Download the latest release of OpenSSH-Win[32 or 64].zip
- Unzip the contents into
c:/Program Files/OpenSSH-Win64(or 32 depending on your download) - Edit the system path to include the new folder (Control Panel > System > Advanced > Environment Variables)
Next run some of the Powershell scripts (as administrator) that are in the new folder to setup open ssh.
.\install-sshd.ps1
.\ssh-keygen.exe -A
# check that the setup is ok
.\FixHostFilePermissions.ps1
Now if you have firewall enabled you can add a firewall rule to allow connections via port 22.
- Open Control Panel > System and Security > Windows … Firewall > Advanced Settings
- Add a new “Inbound Rule”
- Select type=custom
- Select all programs
- Select Protocol type=TCP
- Select Local ports=Specific Ports and add
22
Finally, edit the services to use a windows domain service account that is part of the PC’s administrator group.
- Open Services
- Find the two
OpenSSHservices. - Set them both to start automatically.
- On the Properties > Log On add your admin service account.
Start the services!
∞ Troubleshooting
The services may fail to start. This is normal and some security points may need to be added to your administrator group.
See here for a list of specific security points to check.
Another guide to help with troubleshooting: https://hostadvice.com/how-to/how-to-install-an-openssh-server-client-on-a-windows-2016-server/
EAI_AGAIN
EAI_AGAIN error is a error in resolving the hostname. Either use IP addresses or update the host file on your server with the correct mapping (nano /etc/hosts)