Obok RDP, OpenSSH umożliwia SSH/SFTP na VPS Windows.
📋 Wymagania
- Windows Server z uprawnieniami admin; port 22 — zapora.
Instalacja funkcji
PowerShell jako administrator:
PowerShellGet-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Server*' Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Uruchom usługę
PowerShellStart-Service sshd Set-Service -Name sshd -StartupType Automatic Get-Service sshd
Zapora Windows
Reguła często powstaje automatycznie. W przeciwnym razie:
PowerShellNew-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -DisplayName "OpenSSH Server (TCP 22)" -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
Test z PC
Zamień VPS_IP i nazwę użytkownika:
Bashssh utilisateur@IP_DU_VPS
SFTP : sftp utilisateur@IP_DU_VPS
Bezpieczeństwo
- Preferuj klucze SSH
- Ogranicz konta
- Konfiguracja początkowa i aktualizacje
Powodzenia! 🚀