From ba18e56568a96840cde051e98023d202fd307cc2 Mon Sep 17 00:00:00 2001 From: Angelo Noto Date: Sat, 20 Jun 2026 23:43:05 -0400 Subject: [PATCH] add more ssh stuff --- README.md | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cf13165..1a3fc36 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,39 @@ stow git stow creates the symlinks automatically and handles conflicts nicely. ## WSL +Resources: +* [ssh-agent-on-windows](https://medium.com/@wondrous_oxblood_cheetah_508/ssh-agent-on-windows-c74b90fb2e31) + +### Install [![OpenSSH](https://img.shields.io/badge/Windows-OpenSSH?style=flat-square&label=OpenSSH&color=blue )](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell&pivots=windows-11) - -In windows enable OpenSSH Agent - -(Learn OpenSSH)[] ```powershell Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*' +``` +```powershell +# Install the OpenSSH Client +Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 +# Install the OpenSSH Server +Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 +``` +```powershell +# Start the sshd service +Start-Service sshd + +# OPTIONAL but recommended: +Set-Service -Name sshd -StartupType 'Automatic' + +# Confirm the Firewall rule is configured. It should be created automatically by setup. Run the following to verify +if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue)) { + 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." +} +``` + +```powershell +Set-Service -Name 'ssh-agent' -StartupType Automatic +Start-Service ssh-agent ``` \ No newline at end of file