Closed
Description
OperatingSystem:
PS C:\windows\system32> [System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 18363 0
What is failing
- Following this guide in vscode on how to configure
ssh-agent
in PowerShell(run as admin), but running cmds(I have openSSH installed already) gave me the following error:
PS C:\windows\system32> sc config ssh-agent start==auto
Set-Content : A positional parameter cannot be found that accepts argument 'start==auto'.
At line:1 char:1
+ sc config ssh-agent start==auto
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-Content], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetContentCommand
PS C:\windows\system32> sc config ssh-agent
sc : Access to the path 'C:\windows\system32\config' is denied.
At line:1 char:1
+ sc config ssh-agent
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-Content], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetContentCommand
- Run as admin.
Expected: Should show config success as it did on my other PC.
So far I tried
- restart Powershell, run as admin & repeat above steps;
- Checked this issue
- Restart ssh-agent.
- Check ssh status:
PS> ssh-agent.exe
unable to start ssh-agent service, error :1058
PS C:\windows\system32> ssh-agent.exe
PS C:\windows\system32> Get-Service ssh-agent
Status Name DisplayName
------ ---- -----------
Running ssh-agent OpenSSH Authentication Agent
PS C:\windows\system32> Start-Service ssh-agent
Metadata
Metadata
Assignees
Labels
No labels