Passwordless SSH setup from Linux to Windows Server

SamJain
Jul 26, 2021

On windows

Install openssh for Windows Server 2012-2018

Download OPENSSH and Extract to C:\Program Files\OpenSSHpowershell -ExecutionPolicy Bypass -File install-sshd.ps1
net start sshd ; net start ssh-agent

Enable OpenSSH feature:

Apps & Features > Manage Optional Features

OpenSSH Server and OpenSSH Client should be listed, if they are not: Add a Feature

After enabling/installation of ssh

Set-Service ssh-agent -StartupType Automatic 
Set-Service sshd -StartupType Automatic
Get-Service -Name ssh-agent,sshd
New-Item -ItemType file "C:\ProgramData\ssh\administrators_authorized_keys"

Append public key from Linux user to C:\ProgramData\ssh\administrators_authorized_keys

Here u go, u can ssh to windows now

--

--

SamJain

Hi, I am Sampada Jain, a system and Cloud Technologies enthusiast. I find learning technologies easy and love to trouble-shoot errors. Passionate Linux learner.