Last active
December 30, 2024 06:53
-
-
Save WesleyCh3n/ddc724326409b6f8563643bcfd35e034 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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