kentpeacock / rpms / openssh

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