add-key using Cmdr

If the error from the ssh-agent comes, this script will activate it:

@echo off
set keyToAdd=%1
ssh-agent | grep -v echo | sed -e “s/^/@set /” | sed -e “s/;.*$//” – > call.cmd
call call.cmd
del call.cmd
ssh-add “%HOME%\.ssh\%keyToAdd%”
@echo on

Leave a Reply