我已使用以下手册在 Windows Server 2016 上安装了 OpenSSH:
Installing SFTP (SSH FTP) Server on Windows with OpenSSH
但是,我无法启动 OpenSSH(错误 1067)。最重要的是,services.msc
中根本不存在 sshd。
PS C:\OpenSSH-Win64> .\install-sshd.ps1
[SC] SetServiceObjectSecurity SUCCESS
[SC] ChangeServiceConfig2 SUCCESS
[SC] ChangeServiceConfig2 SUCCESS
sshd and ssh-agent services successfully installed
然后:
PS C:\OpenSSH-Win64> Start-Service sshd
Start-Service : Failed to start service 'OpenSSH SSH Server (sshd)'.
At line:1 char:1
+ Start-Service sshd
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
最佳答案
以下步骤 8 有帮助:
OpenSSH : Install
Back to PowerShell and move to OpenSSH installed folder, then run [.\FixHostFilePermission.ps1] like follows.
关于openssh - 无法在 Windows Server 2016 中启动 openssh,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59227749/