summaryrefslogtreecommitdiff
path: root/ssh_hack
diff options
context:
space:
mode:
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}