use tty allocation for a remote scp

This commit is contained in:
Petr Lautrbach 2014-01-20 19:41:27 +01:00
parent b898cbf5e1
commit 96df3b5ecb
2 changed files with 19 additions and 0 deletions

View File

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

View File

@ -186,6 +186,8 @@ Patch903: openssh-6.3p1-increase-size-of-DF-groups.patch
Patch904: openssh-6.4p1-FIPS-mode-SP800-131A.patch Patch904: openssh-6.4p1-FIPS-mode-SP800-131A.patch
# Run ssh-copy-id in the legacy mode when SSH_COPY_ID_LEGACY variable is set (#969375 # Run ssh-copy-id in the legacy mode when SSH_COPY_ID_LEGACY variable is set (#969375
Patch905: openssh-6.4p1-legacy-ssh-copy-id.patch Patch905: openssh-6.4p1-legacy-ssh-copy-id.patch
# Use tty allocation for a remote scp (#985650)
Patch906: openssh-6.4p1-fromto-remote.patch
License: BSD License: BSD
@ -410,6 +412,7 @@ popd
%patch903 -p1 -b .dh %patch903 -p1 -b .dh
%patch904 -p1 -b .SP800-131A %patch904 -p1 -b .SP800-131A
%patch905 -p1 -b .legacy-ssh-copy-id %patch905 -p1 -b .legacy-ssh-copy-id
%patch906 -p1 -b .fromto-remote
%if 0 %if 0
# Nothing here yet # Nothing here yet