Користувальницькькі налаштування

Налаштування сайту


software:os:windows:ssh

Розбіжності

Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.

Посилання на цей список змін

Порівняння попередніх версій Попередня ревізія
software:os:windows:ssh [2025/05/12 01:01]
charon
software:os:windows:ssh [2025/05/15 22:40] (поточний)
charon [Створимо каталог для конфігів]
Рядок 19: Рядок 19:
 $newDirectoryPath = "C:\Users\$username\.ssh" $newDirectoryPath = "C:\Users\$username\.ssh"
  
 +# Create .ssh directory
 try { try {
     New-Item -ItemType Directory -Path $newDirectoryPath -ErrorAction Stop     New-Item -ItemType Directory -Path $newDirectoryPath -ErrorAction Stop
Рядок 27: Рядок 28:
 } }
 icacls $newDirectoryPath /grant:r "$($env:USERNAME):(F)" /grant:r "SYSTEM:(RX)" /inheritance:r icacls $newDirectoryPath /grant:r "$($env:USERNAME):(F)" /grant:r "SYSTEM:(RX)" /inheritance:r
 +# Create empty .ssh/config file
 New-Item -Path "$newDirectoryPath\config" -ItemType File New-Item -Path "$newDirectoryPath\config" -ItemType File
 +icacls.exe "$newDirectoryPath\config" /setowner $env:USERNAME
 +icacls.exe "$newDirectoryPath\config" /grant:r "$($env:USERDOMAIN)\$($env:USERNAME):F"
 +icacls.exe "$newDirectoryPath\config" /grant:r "SYSTEM:F"
 Set-Location $newDirectoryPath Set-Location $newDirectoryPath
 </code> </code>
software/os/windows/ssh.1747000876.txt.gz · Востаннє змінено: 2025/05/12 01:01 повз charon