Skip to content

Instantly share code, notes, and snippets.

View aziwar's full-sized avatar

Ahmed Zewar aziwar

View GitHub Profile
@aziwar
aziwar / work_device_recover.ps1
Last active April 26, 2026 07:22
Claude SSH setup for work device — auto-generated 2026-04-26
# Claude SSH Recovery v1 - restore sshd to working state
# Source: MS Learn openssh_server_configuration (sshd auto-regenerates default sshd_config if missing)
$ErrorActionPreference='Continue'
$ProgressPreference='SilentlyContinue'
[Net.ServicePointManager]::SecurityProtocol=3072
function Stamp($n,$ok,$msg=''){$c=if($ok){'Green'}else{'Red'};$s=if($ok){'PASS'}else{'FAIL'};$tail=if($msg){' - '+$msg}else{''};Write-Host ("[{0}] {1}{2}" -f $s,$n,$tail) -F $c}
Write-Host ""
Write-Host "===== Claude SSH Recovery =====" -F Cyan