blob: 118d2b516095e23bf0c01bc24f16f35bf53c00d4 [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
Scott Bakerf476a972015-02-02 15:56:31 -080012$PROGRAM=/home/smbaker/projects/vicci/xos/planetstack/tools/get_instance_name.py
Scott Bakerdea04a52014-08-11 18:04:04 -070013
14INSTANCE_NAME=`python $PROGRAM $USERNAME $PASSWORD $1 $SLICENAME`
15ssh-agent bash -c "ssh-add $KEY; ssh -A $INSTANCE_NAME@$1"