try save this file as .PS1 and run using PowerShell
CODE
# setup-ssh-agent.ps1
Write-Host "Configuring the SSH Agent service..."
Get-Service ssh-agent | Set-Service -StartupType Manual
Write-Host "Starting the SSH Agent service..."
Start-Service ssh-agent
Write-Host "Current service status:"
Get-Service ssh-agent
Write-Host "Adding your SSH key to the agent..."
try {
ssh-add "C:\Users\Tech Support\.ssh\id_rsa2"
Write-Host "SSH key added successfully!" -ForegroundColor Green
}
catch {
Write-Host "Error adding SSH key. Is the path correct and is the key passphrase-protected?" -ForegroundColor Red
}
# This keeps the window open so you can see the output
Read-Host "Press Enter to exit"
Write-Host "Configuring the SSH Agent service..."
Get-Service ssh-agent | Set-Service -StartupType Manual
Write-Host "Starting the SSH Agent service..."
Start-Service ssh-agent
Write-Host "Current service status:"
Get-Service ssh-agent
Write-Host "Adding your SSH key to the agent..."
try {
ssh-add "C:\Users\Tech Support\.ssh\id_rsa2"
Write-Host "SSH key added successfully!" -ForegroundColor Green
}
catch {
Write-Host "Error adding SSH key. Is the path correct and is the key passphrase-protected?" -ForegroundColor Red
}
# This keeps the window open so you can see the output
Read-Host "Press Enter to exit"
Sep 25 2025, 10:58 AM
Quote
0.0122sec
1.65
6 queries
GZIP Disabled