From 7d585ba499cdfe85117dc388c022acacb3d02d98 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 7 Nov 2017 16:58:58 +0100 Subject: tools: Update rumba-access to new proxy command After the refactor of ssh_support to use the native paramiko way to setup an ssh connection via a proxy, rumba-access stopped working, since it relied on the exporting of the proxy command to ssh_info. This commit updates rumba-access to take the refactor into account. --- tools/rumba-access | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/rumba-access b/tools/rumba-access index a2a5e83..02f639e 100755 --- a/tools/rumba-access +++ b/tools/rumba-access @@ -26,15 +26,15 @@ if [ "$SSH_PORT" == "" ]; then exit 255 fi -PROXY_CMD=$(grep "\<${MACHINE_ID}\>" ${FILE} | awk -F';' '{print $5}') -if [ "$PROXY_CMD" == "" ]; then +PROXY=$(grep "\<${MACHINE_ID}\>" ${FILE} | awk -F';' '{print $5}') +if [ "$PROXY" == "" ]; then echo "Error: Node ${MACHINE_ID} unknown" exit 255 fi echo "Accessing Rumba node ${MACHINE_ID}" -if [[ $PROXY_CMD = "None" ]]; then +if [[ $PROXY = "None" ]]; then ssh -A -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p ${SSH_PORT} ${USER}@${HOST} else - ssh -A -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -oProxyCommand="$PROXY_CMD" -p ${SSH_PORT} ${USER}@${HOST} + ssh -A -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -oProxyCommand="ssh ${USER}@$PROXY -W %h:%p" -p ${SSH_PORT} ${USER}@${HOST} fi -- cgit v1.2.3