vishalmishra434 / rpms / openssh

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