Created
April 10, 2015 04:15
-
-
Save eldondev/19bb707d7c5f84b82b99 to your computer and use it in GitHub Desktop.
ssh key shenanigans
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 | |
ADDRESS=`echo $SERVICE_ADDR|cut -f 1 -d\:` | |
TMP_KEY=/tmp/`uuidgen` | |
ssh-keygen -t rsa -N "" -f $TMP_KEY | |
. <(ssh-agent ) | |
ssh-add $TMP_KEY | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=false -o IdentitiesOnly=true -o IdentityFile=$TMP_KEY root@$ADDRESS date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment