Login to Windows Server 2022 over SSH from a Linux server.
Follow Step by Step.
Installing OpenSSH opens up a lot of possibilities between Windows and Linux. SUBSCRIBE to see my next video connecting to and managing this Windows Server 2022 using Ansible.
If you want to install and setup winRM for Ansible, checkout my other step by step video her: • Learn How to Use Ansible to Manage Wi...
Please leave me a comment if you have a question and a LIKE if you found it useful!
--------
Below are the commands I ran in this turorial:
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) {
Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..."
New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
} else {
Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' has been created and exists."
}