jonathancammack / rpms / openssh

Forked from rpms/openssh 9 months ago
Clone

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

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