Last active
May 26, 2016 08:22
-
-
Save zsteva/221b9000d555759770a8e65f83812f21 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| if [ -z "$SSH_AGENT_PID" ]; then | |
| echo "no ssh agent" | |
| ssh-agent "$0" "$@" | |
| exit $? | |
| fi | |
| set -e -x | |
| ssh-add ~/.ssh/id_rsa | |
| ssh host command1 | |
| ssh host command2 | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment