bmh10 / rpms / openssh

Forked from rpms/openssh 2 days ago
Clone

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

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