bmh10 / rpms / openssh

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