のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

sshd error

PS C:\OpenSSH\OpenSSH-Win64>
 Set-Service sshd -StartupType Automatic
Set-Service : サービス sshd がコンピューター '.' で見つかりませんでした。
発生場所 行:1 文字:1
+ Set-Service sshd -StartupType Automatic
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.:String) [Set-Service], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.SetServiceCommand

インストールが足りなかった。

PS C:\OpenSSH\OpenSSH-Win64>
 Powershell -ExecutionPolicy Bypass -File install-sshd.ps1
[SC] SetServiceObjectSecurity SUCCESS
[SC] ChangeServiceConfig SUCCESS
[SC] ChangeServiceConfig2 SUCCESS
sshd and ssh-agent services successfully installed


PS C:\OpenSSH\OpenSSH-Win64> Set-Service sshd -StartupType Automatic
PS C:\OpenSSH\OpenSSH-Win64>