remote access: LAN-only sshd bootstrap for debugging installs on target PCs (key-based, subnet-scoped) + disable

This commit is contained in:
Sadmin committed 2026-11-10 14:20:21 +03:00
1 parent 73c59f5c5d
commit cabdaa4cc8
2 files changed
+66

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
@echo off
REM Undo enable_ssh.bat: stop and disable sshd, close the debug firewall rule.
net session >nul 2>&1
if %errorlevel% neq 0 (
echo Need admin rights. Relaunching elevated...
powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
exit /b
)
echo === Stop and disable sshd ===
net stop sshd 2>nul
sc config sshd start= disabled >nul
sc query sshd | findstr STATE
netsh advfirewall firewall delete rule name="docdebug-ssh" >nul
echo Firewall rule docdebug-ssh removed.
echo.
echo === SSH access disabled ===
pause