Загрузка данных


e: Total 3 (delta 2), reused 3 (delta 2), pack-reused 0 (from 0)
Unpacking objects: 100% (3/3), 2.33 KiB | 216.00 KiB/s, done.
From https://github.com/PluxuryIord/lamoda-web-panel
   4e676aa..b6a1b17  main       -> origin/main
Updating 4e676aa..b6a1b17
Fast-forward
 WINDOWS.md | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 119 insertions(+)
PS A:\lamoda-web-panel> Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0


Path          :
Online        : True
RestartNeeded : False



PS A:\lamoda-web-panel> Start-Service sshd
PS A:\lamoda-web-panel> Set-Service -Name sshd -StartupType Automatic
PS A:\lamoda-web-panel> New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force


DefaultShell : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
PSPath       : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\OpenSSH
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE
PSChildName  : OpenSSH
PSDrive      : HKLM
PSProvider   : Microsoft.PowerShell.Core\Registry



PS A:\lamoda-web-panel> $key = 'from="192.168.1.*" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAETS7aLyp6mYBlVHvXHKFkU/ckJl61muKBfkOPVx98P claude-photobooth'
>> $admin = (whoami /groups) -match 'S-1-5-32-544'
>> if ($admin) { $file = "$env:ProgramData\ssh\administrators_authorized_keys" }
>> else { New-Item -ItemType Directory -Force "$env:USERPROFILE\.ssh" | Out-Null; $file = "$env:USERPROFILE\.ssh\authorized_keys" }
>> if (-not (Test-Path $file) -or -not (Select-String -Path $file -SimpleMatch 'claude-photobooth' -Quiet)) { Add-Content -Path $file -Value $key -Encoding ascii }
>> if ($admin) { icacls.exe $file /inheritance:r /grant '*S-1-5-32-544:F' /grant '*S-1-5-18:F' }
>> Write-Host "Ключ добавлен: $file" -ForegroundColor Green
processed file: C:\ProgramData\ssh\administrators_authorized_keys
Successfully processed 1 files; Failed processing 0 files
Ключ добавлен: C:\ProgramData\ssh\administrators_authorized_keys
PS A:\lamoda-web-panel> ipconfig

Windows IP Configuration


Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::323f:7b72:d111:a8f7%4
   IPv4 Address. . . . . . . . . . . : 192.168.1.108
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
PS A:\lamoda-web-panel> whoami
desktop-9d5big3\fdmsport
PS A:\lamoda-web-panel>