SSH From Linux Into Your Microsoft Windows Hosts 🌱

  1. Log into the Windows host
  2. Run the following commands in a powershell window
    # check the current status of ssh server
    Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
    # install the ssh server
    Add-WindowsCapability -Online -Name OpenSSH.Server~~~~
    # start the sshd service and set for automatic startup
    Set-Service -Name sshd -Status Running -StartupType Automatic
    # check the sshd service status
    Get-Service sshd
  3. With SSH now running, let's test connecting to it
  4. From another device (Linux or Windows), ssh into the Windows host
  5. After authenticating you should SSH into a remote PowerShell terminal