Created
February 8, 2021 09:18
-
-
Save guangrei/310c2bf7047c20f76a21197f854c9bfd to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
KEYS=$1 | |
CMDS=$2 | |
if [ $# -eq 0 ] ; then | |
echo "No arguments supplied" | |
echo "Usage: command KEY CMD" | |
exit 1 | |
fi | |
ssh-agent bash -c 'ssh-add $KEYS; $CMDS' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment