diff options
-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} |