Created
January 11, 2016 12:15
-
-
Save mcustiel/65f3f0eebea458f4b1c0 to your computer and use it in GitHub Desktop.
Cmder: Auto start ssh-agent on first login to cmder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasklist /FI "IMAGENAME eq ssh-agent.exe" 2>NUL | grep 'ssh-agent.exe' >NUL | |
@if "%ERRORLEVEL%"=="0" ( | |
echo ssh-agent is running | |
call %CMDER_ROOT%\vendor\call.cmd | |
) else ( | |
ssh-agent | grep -v echo | sed -e "s/^/@set /" | sed -e "s/;.*$//" - > %CMDER_ROOT%\vendor\call.cmd | |
call %CMDER_ROOT%\vendor\call.cmd | |
ssh-add %USERPROFILE%\.ssh\ppk\id_rsa :: Add private keys here | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment