Skip to content

Instantly share code, notes, and snippets.

@eldondev
Created April 10, 2015 04:15
Show Gist options
  • Save eldondev/19bb707d7c5f84b82b99 to your computer and use it in GitHub Desktop.
Save eldondev/19bb707d7c5f84b82b99 to your computer and use it in GitHub Desktop.
ssh key shenanigans
#!/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