Running OpenSSH in Windows PowerShell

San Fransico. Phot Cred: Max Raju

Pre-requisites

Install OpenSSH

Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
Name  : OpenSSH.Client~~~~0.0.1.0
State : Installed
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Configuration

cd C:\Users\<your-user-name>
mkdir .ssh
cd .ssh
New-Item config
notepad config
Host MyServer
HostName 192.168.0.1
User user
Port 22
IdentityFile c:\Users\maxar\.ssh\private-key-file

Connecting

ssh MyServer

Passing Commands to SSH

ssh MyServer systemctl restart my-service.service

--

--

--

Self-taught web-developer with a background in snowsports coaching and operations management. I’m either learning, or I’m teaching.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Secure communication between microservices in Kubernetes using Service Mesh

Integrating MongoDB with Flask

Android personal experiment 1 year & 18 Failed interview processes

Open groups of apps and urls at once

Garden & Terraform: Your End-to-End Kubernetes Workflow

Convert XML to AWS ATHENA

Case-Study on How Industries are using MongoDB

An overview of Strong, Weak, Soft and Phantom references in Java.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Max A Raju

Max A Raju

Self-taught web-developer with a background in snowsports coaching and operations management. I’m either learning, or I’m teaching.

More from Medium

Principles of Security-TryHackMe

Auto enable tap-to-click on Surface Pro 4 after suspend with libinput

re-enable from mouse setting menu

THM Linux Fundamentals PT 3

Access Your Router Settings Via A Connected Device