安装功能
管理员 PowerShell:
PowerShellGet-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Server*' Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
启动服务
PowerShellStart-Service sshd Set-Service -Name sshd -StartupType Automatic Get-Service sshd
Windows 防火墙
规则通常会自动创建,否则:
PowerShellNew-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -DisplayName "OpenSSH Server (TCP 22)" -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
从本机测试
替换 VPS_IP 与 Windows 用户名:
Bashssh USER@VPS_IP
SFTP: sftp USER@VPS_IP
我们的 Windows VPS 同样提供 8 个位置:法国 Windows VPS、德国 Windows VPS、荷兰 Windows VPS、英国 Windows VPS、美国 Windows VPS、加拿大 Windows VPS、土耳其 Windows VPS 和 香港 Windows VPS。 也提供桌面版:Windows 10 RDP 和 Windows 11 RDP。
安全
- 优先使用 SSH 密钥
- 限制允许账户
- 配合初始配置与更新
祝使用顺利!🚀