blob: b8f79d3710431c6e08c1c64dd5cf17d7dd53f786 [file] [log] [blame]
Scott Bakerdea04a52014-08-11 18:04:04 -07001#! /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
12$PROGRAM=/home/smbaker/projects/vicci/plstackapi/planetstack/tools/get_instance_name.py
13
14INSTANCE_NAME=`python $PROGRAM $USERNAME $PASSWORD $1 $SLICENAME`
15ssh-agent bash -c "ssh-add $KEY; ssh -A $INSTANCE_NAME@$1"