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

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


software:os:windows:ssh

Розбіжності

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

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

Порівняння попередніх версій Попередня ревізія
Наступна ревізія
Попередня ревізія
software:os:windows:ssh [2025/05/12 00:26]
charon [Створити нові ssh-ключі]
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>
Рядок 38: Рядок 43:
   icacls "$env:USERPROFILE\.ssh\id_ed25519" /reset   icacls "$env:USERPROFILE\.ssh\id_ed25519" /reset
   icacls "$env:USERPROFILE\.ssh\id_ed25519" /inheritance:r   icacls "$env:USERPROFILE\.ssh\id_ed25519" /inheritance:r
-  icacls "$env:USERPROFILE\.ssh\id_ed25519" /grant:r "$($env:USERNAME):(RD)"+  icacls "$env:USERPROFILE\.ssh\id_ed25519" /grant:r "$($env:USERNAME):(R,D)" 
 + 
 +==== Створити конфіг ==== 
 +Відкрити вже існуючий файл //C:\Users\$username\.ssh\config// і заповнити: 
 +<file config> 
 +############## 
 +## Personal ## 
 +############## 
 +Host pi 
 +  HostName 192.168.50.14 
 +  IdentityFile ~/.ssh/id_ed25519 
 + 
 +############## 
 +## Defaults ## 
 +############## 
 +Host * 
 +     ForwardAgent no 
 +     ForwardX11 no 
 +     User charon 
 +     Port 22 
 +     Protocol 2 
 +     ServerAliveInterval 60 
 +     ServerAliveCountMax 30 
 +     # Ensure KnownHosts are unreadable if leaked - it is otherwise easier to know which hosts your keys have access to. 
 +     HashKnownHosts yes 
 +     # Host keys the client accepts - order here is honored by OpenSSH 
 +     HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256 
 +     KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 
 +     MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com 
 +     Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr 
 +</file>
software/os/windows/ssh.1746998765.txt.gz · Востаннє змінено: 2025/05/12 00:26 повз charon