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


icacls "$env:ProgramData\ssh\administrators_authorized_keys" /inheritance:r /grant "*S-1-5-32-544:F" /grant "*S-1-5-18:F"; Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Private; New-NetFirewallRule -Name sshd-pb -DisplayName "OpenSSH Server" -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Profile Any -ErrorAction SilentlyContinue | Out-Null; Restart-Service sshd; "готово"



Test-NetConnection -ComputerName localhost -Port 22 | Select-Object TcpTestSucceeded; Get-NetConnectionProfile | Select-Object InterfaceAlias, NetworkCategory; Get-NetFirewallRule -Name *ssh* | Select-Object Name, Enabled, Profile