diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2019-01-21 22:50:43 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2019-01-21 22:50:43 +0000 |
commit | 300c674e468d6900848cd181cf141c27b06a3a07 (patch) | |
tree | ea98081f7f4bdec3dadf4c1ce69ec2e6276e1bf2 /usr.bin/ssh/scp.c | |
parent | a6c130774e5c0acf3183f9e1d8efabaf99da6fd8 (diff) |
Add a -J option as a shortcut for -o Proxyjump= to scp(1) and sftp(1)
to match ssh(1)'s interface.
ok djm
Diffstat (limited to 'usr.bin/ssh/scp.c')
-rw-r--r-- | usr.bin/ssh/scp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index 17215a70dce..44f064d0bbc 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.198 2018/11/16 03:03:10 djm Exp $ */ +/* $OpenBSD: scp.c,v 1.199 2019/01/21 22:50:42 tb Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -402,7 +402,7 @@ main(int argc, char **argv) addargs(&args, "-oRequestTTY=no"); fflag = tflag = 0; - while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1) + while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:J:")) != -1) switch (ch) { /* User-visible flags. */ case '1': @@ -424,6 +424,7 @@ main(int argc, char **argv) case 'c': case 'i': case 'F': + case 'J': addargs(&remote_remote_args, "-%c", ch); addargs(&remote_remote_args, "%s", optarg); addargs(&args, "-%c", ch); @@ -1286,7 +1287,8 @@ usage(void) { (void) fprintf(stderr, "usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]\n" - " [-l limit] [-o ssh_option] [-P port] [-S program] source ... target\n"); + " [-J destination] [-l limit] [-o ssh_option] [-P port]\n" + " [-S program] source ... target\n"); exit(1); } |