diff options
-rw-r--r-- | scp.1 | 17 | ||||
-rw-r--r-- | scp.c | 8 | ||||
-rw-r--r-- | sftp.1 | 18 | ||||
-rw-r--r-- | sftp.c | 14 |
4 files changed, 43 insertions, 14 deletions
@@ -8,9 +8,9 @@ | |||
8 | .\" | 8 | .\" |
9 | .\" Created: Sun May 7 00:14:37 1995 ylo | 9 | .\" Created: Sun May 7 00:14:37 1995 ylo |
10 | .\" | 10 | .\" |
11 | .\" $OpenBSD: scp.1,v 1.81 2018/09/20 06:58:48 jmc Exp $ | 11 | .\" $OpenBSD: scp.1,v 1.82 2019/01/21 22:50:42 tb Exp $ |
12 | .\" | 12 | .\" |
13 | .Dd $Mdocdate: September 20 2018 $ | 13 | .Dd $Mdocdate: January 21 2019 $ |
14 | .Dt SCP 1 | 14 | .Dt SCP 1 |
15 | .Os | 15 | .Os |
16 | .Sh NAME | 16 | .Sh NAME |
@@ -106,6 +106,19 @@ Selects the file from which the identity (private key) for public key | |||
106 | authentication is read. | 106 | authentication is read. |
107 | This option is directly passed to | 107 | This option is directly passed to |
108 | .Xr ssh 1 . | 108 | .Xr ssh 1 . |
109 | .It Fl J Ar destination | ||
110 | Connect to the target host by first making a | ||
111 | .Nm | ||
112 | connection to the jump host described by | ||
113 | .Ar destination | ||
114 | and then establishing a TCP forwarding to the ultimate destination from | ||
115 | there. | ||
116 | Multiple jump hops may be specified separated by comma characters. | ||
117 | This is a shortcut to specify a | ||
118 | .Cm ProxyJump | ||
119 | configuration directive. | ||
120 | This option is directly passed to | ||
121 | .Xr ssh 1 . | ||
109 | .It Fl l Ar limit | 122 | .It Fl l Ar limit |
110 | Limits the used bandwidth, specified in Kbit/s. | 123 | Limits the used bandwidth, specified in Kbit/s. |
111 | .It Fl o Ar ssh_option | 124 | .It Fl o Ar ssh_option |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: scp.c,v 1.198 2018/11/16 03:03:10 djm Exp $ */ | 1 | /* $OpenBSD: scp.c,v 1.199 2019/01/21 22:50:42 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * scp - secure remote copy. This is basically patched BSD rcp which | 3 | * scp - secure remote copy. This is basically patched BSD rcp which |
4 | * uses ssh to do the data transfer (instead of using rcmd). | 4 | * uses ssh to do the data transfer (instead of using rcmd). |
@@ -424,7 +424,7 @@ main(int argc, char **argv) | |||
424 | addargs(&args, "-oRequestTTY=no"); | 424 | addargs(&args, "-oRequestTTY=no"); |
425 | 425 | ||
426 | fflag = tflag = 0; | 426 | fflag = tflag = 0; |
427 | while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1) | 427 | while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:J:")) != -1) |
428 | switch (ch) { | 428 | switch (ch) { |
429 | /* User-visible flags. */ | 429 | /* User-visible flags. */ |
430 | case '1': | 430 | case '1': |
@@ -446,6 +446,7 @@ main(int argc, char **argv) | |||
446 | case 'c': | 446 | case 'c': |
447 | case 'i': | 447 | case 'i': |
448 | case 'F': | 448 | case 'F': |
449 | case 'J': | ||
449 | addargs(&remote_remote_args, "-%c", ch); | 450 | addargs(&remote_remote_args, "-%c", ch); |
450 | addargs(&remote_remote_args, "%s", optarg); | 451 | addargs(&remote_remote_args, "%s", optarg); |
451 | addargs(&args, "-%c", ch); | 452 | addargs(&args, "-%c", ch); |
@@ -1319,7 +1320,8 @@ usage(void) | |||
1319 | { | 1320 | { |
1320 | (void) fprintf(stderr, | 1321 | (void) fprintf(stderr, |
1321 | "usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]\n" | 1322 | "usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]\n" |
1322 | " [-l limit] [-o ssh_option] [-P port] [-S program] source ... target\n"); | 1323 | " [-J destination] [-l limit] [-o ssh_option] [-P port]\n" |
1324 | " [-S program] source ... target\n"); | ||
1323 | exit(1); | 1325 | exit(1); |
1324 | } | 1326 | } |
1325 | 1327 | ||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: sftp.1,v 1.123 2019/01/16 23:23:45 djm Exp $ | 1 | .\" $OpenBSD: sftp.1,v 1.124 2019/01/21 22:50:42 tb Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2001 Damien Miller. All rights reserved. | 3 | .\" Copyright (c) 2001 Damien Miller. All rights reserved. |
4 | .\" | 4 | .\" |
@@ -22,7 +22,7 @@ | |||
22 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
23 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 | .\" | 24 | .\" |
25 | .Dd $Mdocdate: January 16 2019 $ | 25 | .Dd $Mdocdate: January 21 2019 $ |
26 | .Dt SFTP 1 | 26 | .Dt SFTP 1 |
27 | .Os | 27 | .Os |
28 | .Sh NAME | 28 | .Sh NAME |
@@ -37,6 +37,7 @@ | |||
37 | .Op Fl D Ar sftp_server_path | 37 | .Op Fl D Ar sftp_server_path |
38 | .Op Fl F Ar ssh_config | 38 | .Op Fl F Ar ssh_config |
39 | .Op Fl i Ar identity_file | 39 | .Op Fl i Ar identity_file |
40 | .Op Fl J Ar destination | ||
40 | .Op Fl l Ar limit | 41 | .Op Fl l Ar limit |
41 | .Op Fl o Ar ssh_option | 42 | .Op Fl o Ar ssh_option |
42 | .Op Fl P Ar port | 43 | .Op Fl P Ar port |
@@ -181,6 +182,19 @@ Selects the file from which the identity (private key) for public key | |||
181 | authentication is read. | 182 | authentication is read. |
182 | This option is directly passed to | 183 | This option is directly passed to |
183 | .Xr ssh 1 . | 184 | .Xr ssh 1 . |
185 | .It Fl J Ar destination | ||
186 | Connect to the target host by first making a | ||
187 | .Nm | ||
188 | connection to the jump host described by | ||
189 | .Ar destination | ||
190 | and then establishing a TCP forwarding to the ultimate destination from | ||
191 | there. | ||
192 | Multiple jump hops may be specified separated by comma characters. | ||
193 | This is a shortcut to specify a | ||
194 | .Cm ProxyJump | ||
195 | configuration directive. | ||
196 | This option is directly passed to | ||
197 | .Xr ssh 1 . | ||
184 | .It Fl l Ar limit | 198 | .It Fl l Ar limit |
185 | Limits the used bandwidth, specified in Kbit/s. | 199 | Limits the used bandwidth, specified in Kbit/s. |
186 | .It Fl o Ar ssh_option | 200 | .It Fl o Ar ssh_option |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.189 2019/01/16 23:23:45 djm Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.190 2019/01/21 22:50:42 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -2362,11 +2362,10 @@ usage(void) | |||
2362 | 2362 | ||
2363 | fprintf(stderr, | 2363 | fprintf(stderr, |
2364 | "usage: %s [-46aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n" | 2364 | "usage: %s [-46aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n" |
2365 | " [-D sftp_server_path] [-F ssh_config] " | 2365 | " [-D sftp_server_path] [-F ssh_config] [-i identity_file]\n" |
2366 | "[-i identity_file] [-l limit]\n" | 2366 | " [-J destination] [-l limit] [-o ssh_option] [-P port]\n" |
2367 | " [-o ssh_option] [-P port] [-R num_requests] " | 2367 | " [-R num_requests] [-S program] [-s subsystem | sftp_server]\n" |
2368 | "[-S program]\n" | 2368 | " destination\n", |
2369 | " [-s subsystem | sftp_server] destination\n", | ||
2370 | __progname); | 2369 | __progname); |
2371 | exit(1); | 2370 | exit(1); |
2372 | } | 2371 | } |
@@ -2409,7 +2408,7 @@ main(int argc, char **argv) | |||
2409 | infile = stdin; | 2408 | infile = stdin; |
2410 | 2409 | ||
2411 | while ((ch = getopt(argc, argv, | 2410 | while ((ch = getopt(argc, argv, |
2412 | "1246afhpqrvCc:D:i:l:o:s:S:b:B:F:P:R:")) != -1) { | 2411 | "1246afhpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) { |
2413 | switch (ch) { | 2412 | switch (ch) { |
2414 | /* Passed through to ssh(1) */ | 2413 | /* Passed through to ssh(1) */ |
2415 | case '4': | 2414 | case '4': |
@@ -2419,6 +2418,7 @@ main(int argc, char **argv) | |||
2419 | break; | 2418 | break; |
2420 | /* Passed through to ssh(1) with argument */ | 2419 | /* Passed through to ssh(1) with argument */ |
2421 | case 'F': | 2420 | case 'F': |
2421 | case 'J': | ||
2422 | case 'c': | 2422 | case 'c': |
2423 | case 'i': | 2423 | case 'i': |
2424 | case 'o': | 2424 | case 'o': |