diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2020-04-30 17:07:11 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2020-04-30 17:07:11 +0000 |
commit | bf77ffc765da456bafaaa641d6b3d9dbac2bf229 (patch) | |
tree | 7498e993bd2801e22f6307ed6c133d04892b705c /usr.bin | |
parent | 7851b2127dd04d81e4961b5965eac1f12d1d8be2 (diff) |
run the 2nd ssh with BatchMode for scp -3
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/scp.1 | 9 | ||||
-rw-r--r-- | usr.bin/ssh/scp.c | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/ssh/scp.1 b/usr.bin/ssh/scp.1 index 9c3a8536649..36d9e735e79 100644 --- a/usr.bin/ssh/scp.1 +++ b/usr.bin/ssh/scp.1 @@ -8,9 +8,9 @@ .\" .\" Created: Sun May 7 00:14:37 1995 ylo .\" -.\" $OpenBSD: scp.1,v 1.87 2019/11/30 07:07:59 jmc Exp $ +.\" $OpenBSD: scp.1,v 1.88 2020/04/30 17:07:10 markus Exp $ .\" -.Dd $Mdocdate: November 30 2019 $ +.Dd $Mdocdate: April 30 2020 $ .Dt SCP 1 .Os .Sh NAME @@ -74,7 +74,10 @@ The options are as follows: Copies between two remote hosts are transferred through the local host. Without this option the data is copied directly between the two remote hosts. -Note that this option disables the progress meter. +Note that this option disables the progress meter and selects batch mode +for the second host, since +.Nm scp +cannot ask passwords or passphrases for both hosts. .It Fl 4 Forces .Nm diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index 4830ae1f58f..4b800268bce 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.207 2020/01/23 07:10:22 dtucker Exp $ */ +/* $OpenBSD: scp.c,v 1.208 2020/04/30 17:07:10 markus Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -328,6 +328,7 @@ do_cmd2(char *host, char *remuser, int port, char *cmd, int fdin, int fdout) addargs(&args, "-l"); addargs(&args, "%s", remuser); } + addargs(&args, "-oBatchMode=yes"); addargs(&args, "--"); addargs(&args, "%s", host); addargs(&args, "%s", cmd); |