remote access: LAN-only sshd bootstrap for debugging installs on target PCs (key-based, subnet-scoped) + disable
This commit is contained in:
1 parent
73c59f5c5d
commit
cabdaa4cc8
2 files changed
+66
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user