Compare commits

..

26 Commits

Author SHA1 Message Date
4300cbfa53 . 2025-08-30 13:01:48 +01:00
e22f17384b . 2025-08-29 16:12:11 +01:00
1d744181c0 . 2025-08-29 15:45:50 +01:00
cb7bd116e3 . 2025-08-29 15:37:57 +01:00
af4d813fd4 . 2025-08-22 16:55:44 +01:00
97a7e36cbd . 2025-08-22 15:19:24 +01:00
5ec540b655 . 2025-08-22 15:18:43 +01:00
9edf0897b6 . 2025-08-22 15:15:44 +01:00
615ba57532 . 2025-08-22 15:09:39 +01:00
3cc521e1c4 . 2025-08-21 18:37:31 +01:00
2f0dc84a56 . 2025-08-21 18:32:33 +01:00
5e047a1425 . 2025-08-11 12:57:20 +01:00
a62c97be93 . 2025-08-10 19:12:56 +01:00
86ac65f758 . 2025-08-10 17:57:24 +01:00
bb32504713 . 2025-08-06 22:26:33 +01:00
9ad206929b . 2025-07-09 21:34:09 +01:00
e7a798c937 . 2025-04-25 13:24:58 +01:00
add4cc4455 . 2024-09-02 19:34:11 +01:00
65cdeb8d5e . 2023-10-03 18:24:45 +01:00
c35a04a807 . 2023-09-27 21:12:01 +01:00
096c42053c . 2023-09-27 21:10:35 +01:00
9055ccf635 . 2023-09-27 21:05:01 +01:00
ca2f43e616 . 2023-09-27 20:51:17 +01:00
44557356a6 . 2023-09-27 20:49:34 +01:00
9da3b534a1 . 2023-09-27 20:41:50 +01:00
22f20d7c46 update to latest openssh 2023-09-27 20:30:09 +01:00
10 changed files with 104 additions and 102 deletions

View File

@ -1,3 +1,6 @@
Run InstallSSH.bat in an Administrator command prompt
1) Download zip of repo
2) mkdir C:\wPublic
3) Unpack wPublic to C:\wPublic
4) Start command prompt in ADMINISTRATOR mode
5) Run C:\wPublic\bin\InstalSSh.bat in the above command prompt

View File

@ -1,4 +1,6 @@
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.9.1.0p1-Beta/OpenSSH-Win64.zip"
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.2.2.0p1-Beta/OpenSSH-Win64.zip"
$source = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.8.3.0p2-Preview/OpenSSH-Win64.zip"
$destination = "C:\Packages\OpenSSH-Win64.zip"
Invoke-WebRequest -Uri $source -OutFile $destination

View File

@ -1,3 +1,15 @@
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
# New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
Set-Service sshd -StartupType Automatic
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 | Select-Object Name, Enabled)) {
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."
}

View File

@ -1,18 +1,20 @@
@echo off
set check_computername=%COMPUTERNAME%
echo "Found computer %check_computername%"
set PACKAGES="C:\Packages"
set WPUBLIC="C:\wPublic"
set POWERSHELL=%SYSTEMROOT%\system32\WindowsPowerShell\v1.0\powershell.exe
mkdir %PACKAGES%
call %WPUBLIC%\bin\SpeedUpPS.bat
echo "------- attempting uninstall first"
set PSFILE="C:\Program Files\OpenSSH\uninstall-sshd.ps1"
if exist %PSFILE% (
echo "SSH uninstall script"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
)
del /f/s/q "C:\Program Files\OpenSSH\*.*"
@ -21,28 +23,29 @@ rmdir /s/q "C:\Program Files\OpenSSH"
del /f/s/q "C:\Packages\OpenSSH-Win64\*.*"
rmdir /s/q "C:\Packages\OpenSSH-Win64"
echo "Download and unpack OpenSSH"
echo "------- Download and unpack OpenSSH"
set PSFILE="%WPUBLIC%\bin\Download.ps1"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
if exist "C:\Program Files\OpenSSH\sshd.exe" (
echo "OPENSSH already installed"
)
else (
echo "NEW installation"
robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E
)
echo "NEW installation"
robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E
echo "------- Attempting install"
set PSFILE="C:\Program Files\OpenSSH\install-sshd.ps1"
if exist %PSFILE% (
echo "SSH install script"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
)
echo "------- Fix firewall"
set PSFILE="%WPUBLIC%\bin\Firewall.ps1"
if exist %PSFILE% (
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
net start sshd
)
curl.exe --output C:\BaseGitClone.bat --url https://mint.nopenso.com/mirror/wBase/raw/branch/main/BaseGitClone.bat
curl.exe --output C:\BaseGitClone.bat --url https://git.cabinbagonly.com/mirror/wBase/raw/branch/main/BaseGitClone.bat
curl.exe --output C:\pull.bat --url https://git.cabinbagonly.com/mirror/wPublic/raw/branch/main/bin/pull.bat
call C:\pull.bat
call C:\Scripts\wbase\bin\SpeedUpPS.bat

View File

@ -1,43 +0,0 @@
function listAumids( $userAccount ) {
if ($userAccount -eq "allusers")
{
# Find installed packages for all accounts. Must be run as an administrator in order to use this option.
$installedapps = Get-AppxPackage -allusers
}
elseif ($userAccount)
{
# Find installed packages for the specified account. Must be run as an administrator in order to use this option.
$installedapps = get-AppxPackage -user $userAccount
}
else
{
# Find installed packages for the current account.
$installedapps = get-AppxPackage
}
$aumidList = @()
foreach ($app in $installedapps)
{
foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id)
{
$aumidList += $app.packagefamilyname + "!" + $id
}
}
return $aumidList
}
# Get a list of AUMIDs for the current account:
listAumids
# Get a list of AUMIDs for an account named “CustomerAccount”:
listAumids("CustomerAccount")
# Get a list of AUMIDs for all accounts on the device:
listAumids("allusers")
get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
Get-AppxPackage -allusers

View File

@ -1,10 +0,0 @@
@echo off
set check_computername=%COMPUTERNAME%
echo "Found computer %check_computername%"
set PACKAGES="C:\Packages"
set WPUBLIC="C:\wPublic"
echo "Dump software list"
set PSFILE="%WPUBLIC%\bin\ListSoftware.ps1"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE% > "C:\%check_computername%.txt"

View File

@ -1,18 +0,0 @@
function Optimize-PowershellAssemblies {
# NGEN powershell assembly, improves startup time of powershell by 10x
$old_path = $env:path
try {
$env:path = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | % {
if (! $_.location) {continue}
$Name = Split-Path $_.location -leaf
if ($Name.startswith("Microsoft.PowerShell.")) {
Write-Progress -Activity "Native Image Installation" -Status "$name"
ngen install $_.location | % {"`t$_"}
}
}
} finally {
$env:path = $old_path
}
}
Optimize-PowershellAssemblies

View File

@ -1,11 +0,0 @@
@echo off
set check_computername=%COMPUTERNAME%
echo "Found computer %check_computername%"
set PACKAGES="C:\Packages"
set WPUBLIC="C:\wPublic"
echo "Speed up Powershell processing"
set PSFILE="%WPUBLIC%\bin\SpeedUp.ps1"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%

48
bin/archive/InstallSSH.bat Executable file
View File

@ -0,0 +1,48 @@
@echo off
set check_computername=%COMPUTERNAME%
echo "Found computer %check_computername%"
set PACKAGES="C:\Packages"
set WPUBLIC="C:\wPublic"
mkdir %PACKAGES%
call %WPUBLIC%\bin\SpeedUpPS.bat
set PSFILE="C:\Program Files\OpenSSH\uninstall-sshd.ps1"
if exist %PSFILE% (
echo "SSH uninstall script"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
)
del /f/s/q "C:\Program Files\OpenSSH\*.*"
rmdir /s/q "C:\Program Files\OpenSSH"
del /f/s/q "C:\Packages\OpenSSH-Win64\*.*"
rmdir /s/q "C:\Packages\OpenSSH-Win64"
echo "Download and unpack OpenSSH"
set PSFILE="%WPUBLIC%\bin\Download.ps1"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
if exist "C:\Program Files\OpenSSH\sshd.exe" (
echo "OPENSSH already installed"
)
else (
echo "NEW installation"
robocopy "%PACKAGES%\OpenSSH-Win64" "C:\Program Files\OpenSSH" /E
)
set PSFILE="C:\Program Files\OpenSSH\install-sshd.ps1"
if exist %PSFILE% (
echo "SSH install script"
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
)
set PSFILE="%WPUBLIC%\bin\Firewall.ps1"
if exist %PSFILE% (
Powershell.exe -ExecutionPolicy Bypass -File %PSFILE%
net start sshd
)
curl.exe --output C:\BaseGitClone.bat --url https://mint.nopenso.com/mirror/wBase/raw/branch/main/BaseGitClone.bat

16
bin/pull.bat Normal file
View File

@ -0,0 +1,16 @@
if not exist "C:\Packages" mkdir "C:\Packages"
if not exist "C:\Scripts" mkdir "C:\Scripts"
cd \packages
curl --ssl-no-revoke -o c:\Packages\wlocal.zip https://git.cabinbagonly.com/mirror/wLocal/archive/main.zip
curl --ssl-no-revoke -o c:\Packages\wbase.zip https://git.cabinbagonly.com/mirror/wBase/archive/main.zip
curl --ssl-no-revoke -o c:\Packages\wpublic.zip https://git.cabinbagonly.com/mirror/wPublic/archive/main.zip
cd \scripts
tar -xvf c:\Packages\wlocal.zip
tar -xvf c:\Packages\wbase.zip
tar -xvf c:\Packages\wpublic.zip
del \pull.bat