diff options
author | tb@openbsd.org <tb@openbsd.org> | 2019-01-21 22:50:42 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-22 22:42:01 +1100 |
commit | 622dedf1a884f2927a9121e672bd9955e12ba108 (patch) | |
tree | de34eb30dd40556cf73ed5e6e6ef3b8c945436b0 /sftp.c | |
parent | c882d74652800150d538e22c80dd2bd3cdd5fae2 (diff) |
upstream: Add a -J option as a shortcut for -o Proxyjump= to scp(1)
and sftp(1) to match ssh(1)'s interface.
ok djm
OpenBSD-Commit-ID: a75bc2d5f329caa7229a7e9fe346c4f41c2663fc
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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': |