Skip to content

Commit 7445c02

Browse files
authored
Merge pull request #1 from bca009/codex/fix-service-restart-in-invoke-winutilsshserver
Fix ssh-agent restart handling
2 parents b265675 + 6b0ede8 commit 7445c02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/private/Invoke-WinUtilSSHServer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function Invoke-WinUtilSSHServer {
4242
} else {
4343
try {
4444
Write-Host "ssh-agent is not running. Attempting to restart..."
45-
Restart-Service -Name sshd -Force
45+
Restart-Service -Name 'ssh-agent' -Force
4646
Write-Host "ssh-agent has been restarted successfully."
4747
} catch {
4848
Write-Host "Failed to restart ssh-agent : $_"

0 commit comments

Comments
 (0)