aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMarco Capitani <m.capitani@nextworks.it>2017-06-07 11:08:39 +0200
committerMarco Capitani <m.capitani@nextworks.it>2017-06-07 11:08:39 +0200
commitd62b0595ab660d6c23ab24bd94cd79453f0129ff (patch)
tree06e6db10120307f9091db907cfc562384110bc9d /tools
parent77dccda7380679447fd8ad3176d239901301ba16 (diff)
parentdb18f01116739a2854c4305a7ad72da8c56d446d (diff)
downloadrumba-d62b0595ab660d6c23ab24bd94cd79453f0129ff.tar.gz
rumba-d62b0595ab660d6c23ab24bd94cd79453f0129ff.zip
Merge branch 'master' into jfed-irati-fixes
Diffstat (limited to 'tools')
-rwxr-xr-xtools/rumba-access31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/rumba-access b/tools/rumba-access
new file mode 100755
index 0000000..06b0a02
--- /dev/null
+++ b/tools/rumba-access
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+FILE=ssh_info
+
+MACHINE_ID=$1
+if [ "$MACHINE_ID" == "" ]; then
+ echo "usage: $0 NODE_NAME"
+ exit 255
+fi
+
+USER=$(grep "\<${MACHINE_ID}\>" ${FILE} | awk '{print $2}')
+if [ "$USER" == "" ]; then
+ echo "Error: Node ${MACHINE_ID} unknown"
+ exit 255
+fi
+
+HOST=$(grep "\<${MACHINE_ID}\>" ${FILE} | awk '{print $3}')
+if [ "$HOST" == "" ]; then
+ echo "Error: Node ${MACHINE_ID} unknown"
+ exit 255
+fi
+
+SSH_PORT=$(grep "\<${MACHINE_ID}\>" ${FILE} | awk '{print $4}')
+if [ "$SSH_PORT" == "" ]; then
+ echo "Error: Node ${MACHINE_ID} unknown"
+ exit 255
+fi
+
+echo "Accessing Rumba node ${MACHINE_ID}"
+# -o IdentityFile=buildroot/irati_rsa
+ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p ${SSH_PORT} ${USER}@${HOST}