jonathancammack / rpms / openssh

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