rutwa189 / rpms / openssh

Forked from rpms/openssh a year ago
Clone

Blame SOURCES/openssh-6.4p1-fromto-remote.patch

943807
diff --git a/scp.c b/scp.c
943807
index d98fa67..25d347b 100644
943807
--- a/scp.c
943807
+++ b/scp.c
943807
@@ -638,7 +638,10 @@ toremote(char *targ, int argc, char **argv)
943807
 			addargs(&alist, "%s", ssh_program);
943807
 			addargs(&alist, "-x");
943807
 			addargs(&alist, "-oClearAllForwardings=yes");
943807
-			addargs(&alist, "-n");
943807
+			if (isatty(fileno(stdin)))
943807
+				addargs(&alist, "-t");
943807
+			else
943807
+				addargs(&alist, "-n");
943807
 			for (j = 0; j < remote_remote_args.num; j++) {
943807
 				addargs(&alist, "%s",
943807
 				    remote_remote_args.list[j]);