Article Directory
Problem Description
JumpServer will periodically traverse and update the asset list. It will update the asset information of the host, such as CPU, MEM, DISK, operating system and other information. This function is based on SSH, so Linux can directly obtain the corresponding information, but Windows cannot directly obtain the information.
So how do you make Windows have the corresponding information?
problem solved
-
OpenSSH component download
https://github.com/PowerShell/Win32-OpenSSH/releases/latest -
After unzipping, rename it to C:\Program Files\OpenSSH
-
Open powershell as an administrator
-
Install OpenSSH components
cd "C:\Program Files\OpenSSH"
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
Windows防火墙配置
New-NetFirewallRule -Name sshd -DisplayName ‘OpenSSH Server (sshd)’ -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
- OpenSSH service startup configuration
net start sshd
Set-Service sshd -StartupType Automatic
-
Add SSH protocol to Windows assets
Find your windows assets in the asset list of the web, add rdp 3389 to the protocol group, and add another ssh 22
-
The account password for remote test ssh login is the same as the account password for logging in to the windows system
Reference
Windows 2019 set up OpenSSH components
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
Ansible can generally manage Windows versions under current and extended support from Microsoft. Ansible can manage desktop OSs including Windows 7, 8.1, and 10, and server OSs including Windows Server 2008, 2008 R2, 2012, 2012 R2, 2016, and 2019.
https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html