Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Kill all ssh-agents Windows
taskkill /F /IM ssh-agent.exe /T
Copy link

Adimvicky commented Aug 27, 2019

Helpful! Thanks for this.

Copy link

cuongthm commented Nov 8, 2019

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

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.

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:

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


Copy link

AKrauseDesign commented Jun 19, 2020

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

Copy link

jagrutipyth commented Aug 24, 2020

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