Scott Baker | dea04a5 | 2014-08-11 18:04:04 -0700 | [diff] [blame] | 1 | #! /bin/bash |
| 2 | |
| 3 | # Demonstrates using get_instance_name to ssh to an instance at a hostname |
| 4 | # Call this script with one argument, the name of the node you want to ssh |
| 5 | |
| 6 | # fill in all ow the following wiht your info |
| 7 | |
| 8 | $USERNAME=my_username |
| 9 | $PASSWORD=my_password |
| 10 | $SLICENAME=my_slice |
| 11 | $KEY=pathname_to_my_ssh_key |
Scott Baker | f476a97 | 2015-02-02 15:56:31 -0800 | [diff] [blame] | 12 | $PROGRAM=/home/smbaker/projects/vicci/xos/planetstack/tools/get_instance_name.py |
Scott Baker | dea04a5 | 2014-08-11 18:04:04 -0700 | [diff] [blame] | 13 | |
| 14 | INSTANCE_NAME=`python $PROGRAM $USERNAME $PASSWORD $1 $SLICENAME` |
| 15 | ssh-agent bash -c "ssh-add $KEY; ssh -A $INSTANCE_NAME@$1" |