[scp.1 scp.c sftp.1 sftp.c]
      add -Fssh_config option; ok markus@
This commit is contained in:
Ben Lindstrom 2001-09-18 05:38:44 +00:00
parent 99b8febe11
commit 1e24324164
5 changed files with 34 additions and 12 deletions

View File

@ -8,6 +8,10 @@
put somewhere sane. Add Ssh.bin to manifest.
- (djm) Make smartcard support conditional in Redhat RPM spec
- (bal) LICENCE update. Has not been done in a while.
- OpenBSD CVS Sync
- stevesk@cvs.openbsd.org 2001/09/17 17:57:57
[scp.1 scp.c sftp.1 sftp.c]
add -Fssh_config option; ok markus@
20010917
- (djm) x11-ssh-askpass-1.2.4 in RPM spec, revert workarounds
@ -6468,4 +6472,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
$Id: ChangeLog,v 1.1531 2001/09/18 05:36:27 mouring Exp $
$Id: ChangeLog,v 1.1532 2001/09/18 05:38:44 mouring Exp $

9
scp.1
View File

@ -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

11
scp.c
View File

@ -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"
@ -241,7 +241,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':
@ -252,6 +252,7 @@ main(argc, argv)
case 'o':
case 'c':
case 'i':
case 'F':
addargs(&args, "-%c%s", ch, optarg);
break;
case 'P':
@ -954,9 +955,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);
}

9
sftp.1
View File

@ -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

11
sftp.c
View File

@ -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') */
@ -93,7 +93,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);
}
@ -119,7 +121,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");
@ -131,8 +133,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;