Skip to content

Instantly share code, notes, and snippets.

@versedi
Created August 30, 2015 10:57
Show Gist options
  • Save versedi/a378513271ad01e4b7f3 to your computer and use it in GitHub Desktop.
Save versedi/a378513271ad01e4b7f3 to your computer and use it in GitHub Desktop.
Kill all ssh-agents Windows
taskkill /F /IM ssh-agent.exe /T
@Adimvicky
Copy link

Helpful! Thanks for this.

@cuongthm
Copy link

cuongthm commented Nov 8, 2019

How to kill ssh-agent.exe without Admin rights?

@cuongthm
Copy link

cuongthm commented Nov 9, 2019

Hi, did you try via windows task manager?
-- Контакты для связи: +375292425337 C Уважением, Владислав

Hi, I can end the ssh-agent.exe process using Task Manager. But I want to using command lines for convenient.

For example:

My Windows OpenSSH Authentication Agent service was set to Manual
Open command prompt and type:

ssh-agent ## start ssh-agent service
ssh user@host ## connect to server host

## do some server stuff then exit

ssh-agent -k ## want to stop ssh-agent service here but it doesn't work
taskkill /F /IM ssh-agent.exe /T ## error access is denied here

I don't want to open Command Prompt as Admin just for doing SSH connect to server.

@cuongthm
Copy link

cuongthm commented Feb 10, 2020

Hello all.

I have just figured out a way to stop services without Admin right :D.
Read here: http://woshub.com/set-permissions-on-windows-service/

So you guy just using the net stop command to stop ssh-agent service without Admin right or using taskkill.

Greeting.

@AKrauseDesign
Copy link

It's worth noting that when using Git Bash, you have to do taskkill -F //IM ssh-agent.exe //T instead of taskkill /F /IM ssh-agent.exe /T

@jagrutipyth
Copy link

Another way to do that is to open 'Task Manager (Ctrl + Alt + Delete)', find ssh-agent and end process.

Thank you so much!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment