This commit is contained in:
陆柯 2021-08-08 13:21:51 +08:00
parent d45225703b
commit 2f527c84ea

View File

@ -0,0 +1,17 @@
REM 介绍 https://winscp.net/eng/docs/guide_windows_openssh_server#installing_sftp_ssh_server
REM 下载 https://github.com/PowerShell/Win32-OpenSSH/releases
REM open a CMD or PowerShell as Administrator, then run this bat.
cd C:\bin\OpenSSH-Win64
powershell.exe -ExecutionPolicy Bypass -File .\install-sshd.ps1
.\ssh-keygen.exe -A
powershell.exe -ExecutionPolicy Bypass -File .\FixHostFilePermissions.ps1
REM Windows 8 and 2012 or newer only:
powershell.exe New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH
sc config sshd start=auto
sc start sshd