summaryrefslogtreecommitdiff
path: root/ssh_hack
diff options
context:
space:
mode:
authorepoch <epoch@enzo.thebackupbox.net>2021-11-14 04:27:43 +0000
committerepoch <epoch@enzo.thebackupbox.net>2021-11-14 04:27:43 +0000
commite30cd702286d91b99107bab4005e32e1e480c83f (patch)
tree9c0bf7496d5e98fab16853e6f941463f07a9956b /ssh_hack
parentb19fda7a666dc4d339b7df60e080b59fca012a33 (diff)
downloaduritools-e30cd702286d91b99107bab4005e32e1e480c83f.tar.gz
uritools-e30cd702286d91b99107bab4005e32e1e480c83f.zip
ssh_hack was failing if there were no query string
Diffstat (limited to 'ssh_hack')
-rwxr-xr-xssh_hack9
1 files changed, 6 insertions, 3 deletions
diff --git a/ssh_hack b/ssh_hack
index e882cd2..1af4f7c 100755
--- a/ssh_hack
+++ b/ssh_hack
@@ -18,9 +18,12 @@ if [ "$u" ];then
HACK_USER="$u@"
fi
+if [ "$q" ];then
tmpfile=$(mktemp);
-printf '%s\n' "$q" | tr '&' '\n' | cut -d= -f1 | sed 's/^/SendEnv /g' > "$tmpfile"
-
-ssh -F "$tmpfile" -t ${HACK_PORT} ${HACK_USER}${d} ${p:1}
+ printf '%s\n' "$q" | tr '&' '\n' | cut -d= -f1 | sed 's/^/SendEnv /g' > "$tmpfile"
+ ssh -F "$tmpfile" -t ${HACK_PORT} ${HACK_USER}${d} ${p:1}
+else
+ ssh -t ${HACK_PORT} ${HACK_USER}${d} ${p:1}
+fi
#ssh -F <(printf '%s\n' "$q" | tr '&' '\n' | cut -d= -f1 | sed 's/^/SendEnv /g') -t ${HACK_PORT} ${HACK_USER}${d} ${p:1}
#ssh -F <(printf '%s\n' "$q" | tr '&' '\n' | cut -d= -f1 | sed 's/^/SendEnv /g') -t ${HACK_PORT} ${HACK_USER}${d} ${p:1}