Created
May 5, 2015 22:14
-
-
Save stavarotti/1627a2eeed2f216416a2 to your computer and use it in GitHub Desktop.
Automatically add ssh-keys when cmder starts
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
:: Automatically add ssh keys when cmder starts | |
::cmder\1.1.4.1\vendor\init.bat | |
:: Run ssh-agent initialisation | |
@if "%SSH_AGENT_PID%"=="" ( | |
@bash C:\opt\cmder\1.1.4.1\bin\ssh-agent-init.sh | |
@call ssh-agent-setter.cmd | |
@del ssh-agent-setter.cmd | |
ssh-add %USERPROFILE%/.ssh/20150505_rsa | |
) else ( | |
@echo SSH Agent already running with PID %SSH_AGENT_PID% | |
) | |
::cmder\1.1.4.1\bin\ssh-agent-init.sh | |
#! /bin/bash | |
eval `ssh-agent -s` | |
echo "@SET SSH_AGENT_PID="$SSH_AGENT_PID>ssh-agent-setter.cmd | |
echo "@SET SSH_AUTH_SOCK="$SSH_AUTH_SOCK>>ssh-agent-setter.cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment