Skip to content

Instantly share code, notes, and snippets.

@WesleyCh3n
Last active December 30, 2024 06:53
Show Gist options
  • Save WesleyCh3n/ddc724326409b6f8563643bcfd35e034 to your computer and use it in GitHub Desktop.
Save WesleyCh3n/ddc724326409b6f8563643bcfd35e034 to your computer and use it in GitHub Desktop.
# Check ssh client/server availability
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
# Install Client if not present
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
# Install Server if not present
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
# Start ssh server
Start-Service sshd
# Enable start on boot
Set-Service -Name sshd -StartupType 'Automatic'
# Setup profile to public
netsh advfirewall firewall set rule name="OpenSSH SSH Server (sshd)" new profile=public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment