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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

SamJain
SamJain

Written by 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.

No responses yet

Write a response