From dea04a58e99a38905c7279d0041615917c9a489e Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Mon, 11 Aug 2014 18:04:04 -0700 Subject: [PATCH] sample script using get-instance-name --- planetstack/tools/ssh-myslice | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 planetstack/tools/ssh-myslice diff --git a/planetstack/tools/ssh-myslice b/planetstack/tools/ssh-myslice new file mode 100755 index 0000000..b8f79d3 --- /dev/null +++ b/planetstack/tools/ssh-myslice @@ -0,0 +1,15 @@ +#! /bin/bash + +# Demonstrates using get_instance_name to ssh to an instance at a hostname +# Call this script with one argument, the name of the node you want to ssh + +# fill in all ow the following wiht your info + +$USERNAME=my_username +$PASSWORD=my_password +$SLICENAME=my_slice +$KEY=pathname_to_my_ssh_key +$PROGRAM=/home/smbaker/projects/vicci/plstackapi/planetstack/tools/get_instance_name.py + +INSTANCE_NAME=`python $PROGRAM $USERNAME $PASSWORD $1 $SLICENAME` +ssh-agent bash -c "ssh-add $KEY; ssh -A $INSTANCE_NAME@$1" -- 2.43.0