sample script using get-instance-name
authorScott Baker <smbaker@gmail.com>
Tue, 12 Aug 2014 01:04:04 +0000 (18:04 -0700)
committerScott Baker <smbaker@gmail.com>
Tue, 12 Aug 2014 01:04:04 +0000 (18:04 -0700)
planetstack/tools/ssh-myslice [new file with mode: 0755]

diff --git a/planetstack/tools/ssh-myslice b/planetstack/tools/ssh-myslice
new file mode 100755 (executable)
index 0000000..b8f79d3
--- /dev/null
@@ -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"