diff options
-rw-r--r-- | usr.bin/ssh/scp.1 | 9 | ||||
-rw-r--r-- | usr.bin/ssh/scp.c | 11 | ||||
-rw-r--r-- | usr.bin/ssh/sftp.1 | 9 | ||||
-rw-r--r-- | usr.bin/ssh/sftp.c | 11 |
4 files changed, 29 insertions, 11 deletions
diff --git a/usr.bin/ssh/scp.1 b/usr.bin/ssh/scp.1 index 960f1ac95ad..11bcfe1dcd0 100644 --- a/usr.bin/ssh/scp.1 +++ b/usr.bin/ssh/scp.1 @@ -9,7 +9,7 @@ .\" .\" Created: Sun May 7 00:14:37 1995 ylo .\" -.\" $OpenBSD: scp.1,v 1.18 2001/09/05 06:23:07 deraadt Exp $ +.\" $OpenBSD: scp.1,v 1.19 2001/09/17 17:57:56 stevesk Exp $ .\" .Dd September 25, 1999 .Dt SCP 1 @@ -20,6 +20,7 @@ .Sh SYNOPSIS .Nm scp .Op Fl pqrvC46 +.Op Fl F Ar ssh_config .Op Fl S Ar program .Op Fl P Ar port .Op Fl c Ar cipher @@ -92,6 +93,12 @@ Passes the flag to .Xr ssh 1 to enable compression. +.It Fl F Ar ssh_config +Specifies an alternative +per-user configuration file for +.Nm ssh . +This option is directly passed to +.Xr ssh 1 . .It Fl P Ar port Specifies the port to connect to on the remote host. Note that this option is written with a capital diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index bc9f2dc6242..2b5e5732c41 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -75,7 +75,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.82 2001/09/12 18:18:25 stevesk Exp $"); +RCSID("$OpenBSD: scp.c,v 1.83 2001/09/17 17:57:56 stevesk Exp $"); #include "xmalloc.h" #include "atomicio.h" @@ -225,7 +225,7 @@ main(argc, argv) addargs(&args, "-oFallBackToRsh no"); fflag = tflag = 0; - while ((ch = getopt(argc, argv, "dfprtvBCc:i:P:q46S:o:")) != -1) + while ((ch = getopt(argc, argv, "dfprtvBCc:i:P:q46S:o:F:")) != -1) switch (ch) { /* User-visible flags. */ case '4': @@ -236,6 +236,7 @@ main(argc, argv) case 'o': case 'c': case 'i': + case 'F': addargs(&args, "-%c%s", ch, optarg); break; case 'P': @@ -919,9 +920,9 @@ response() void usage() { - (void) fprintf(stderr, "usage: scp " - "[-pqrvBC46] [-S ssh] [-P port] [-c cipher] [-i identity] " - "[-o option] f1 f2\n" + (void) fprintf(stderr, + "usage: scp [-pqrvBC46] [-F config] [-S ssh] [-P port] [-c cipher] [-i identity]\n" + " [-o option] f1 f2\n" " or: scp [options] f1 ... fn directory\n"); exit(1); } diff --git a/usr.bin/ssh/sftp.1 b/usr.bin/ssh/sftp.1 index 2787e99cbb8..120e16897e5 100644 --- a/usr.bin/ssh/sftp.1 +++ b/usr.bin/ssh/sftp.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sftp.1,v 1.24 2001/09/05 06:23:07 deraadt Exp $ +.\" $OpenBSD: sftp.1,v 1.25 2001/09/17 17:57:57 stevesk Exp $ .\" .\" Copyright (c) 2001 Damien Miller. All rights reserved. .\" @@ -32,6 +32,7 @@ .Nm sftp .Op Fl vC .Op Fl b Ar batchfile +.Op Fl F Ar ssh_config .Op Fl o Ar ssh_option .Op Ar host .Nm sftp @@ -77,6 +78,12 @@ and Enables compression (via ssh's .Fl C flag) +.It Fl F Ar ssh_config +Specifies an alternative +per-user configuration file for +.Nm ssh . +This option is directly passed to +.Xr ssh 1 . .It Fl o Ar ssh_option Can be used to pass options to .Nm ssh diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 3cf807e0ac4..e6ea5240b1f 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -24,7 +24,7 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.18 2001/06/23 15:12:20 itojun Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.19 2001/09/17 17:57:57 stevesk Exp $"); /* XXX: commandline mode */ /* XXX: short-form remote directory listings (like 'ls -C') */ @@ -87,7 +87,9 @@ connect_to_server(char **args, int *in, int *out, pid_t *sshpid) static void usage(void) { - fprintf(stderr, "usage: sftp [-1vC] [-b batchfile] [-osshopt=value] [user@]host[:file [file]]\n"); + fprintf(stderr, + "usage: sftp [-1vC] [-b batchfile] [-F config] [-o option]\n" + " [user@]host[:file [file]]\n"); exit(1); } @@ -112,7 +114,7 @@ main(int argc, char **argv) ll = SYSLOG_LEVEL_INFO; infile = stdin; /* Read from STDIN unless changed by -b */ - while ((ch = getopt(argc, argv, "1hvCo:s:S:b:")) != -1) { + while ((ch = getopt(argc, argv, "1hvCo:s:S:b:F:")) != -1) { switch (ch) { case 'C': addargs(&args, "-C"); @@ -124,8 +126,9 @@ main(int argc, char **argv) } debug_level++; break; + case 'F': case 'o': - addargs(&args, "-o%s", optarg); + addargs(&args, "-%c%s", ch, optarg); break; case '1': sshver = 1; |