vishalmishra434 / rpms / openssh

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