diff options
author | epoch <epoch@enzo.thebackupbox.net> | 2021-11-14 04:27:43 +0000 |
---|---|---|
committer | epoch <epoch@enzo.thebackupbox.net> | 2021-11-14 04:27:43 +0000 |
commit | e30cd702286d91b99107bab4005e32e1e480c83f (patch) | |
tree | 9c0bf7496d5e98fab16853e6f941463f07a9956b /ssh_hack | |
parent | b19fda7a666dc4d339b7df60e080b59fca012a33 (diff) | |
download | uritools-e30cd702286d91b99107bab4005e32e1e480c83f.tar.gz uritools-e30cd702286d91b99107bab4005e32e1e480c83f.zip |
ssh_hack was failing if there were no query string
Diffstat (limited to 'ssh_hack')
-rwxr-xr-x | ssh_hack | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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} |