View | Details | Raw Unified | Return to bug 831 | Differences between
and this patch

Collapse All | Expand All

(-)a/scp.1 (-1 / +5 lines)
Lines 19-25 Link Here
19
.Sh SYNOPSIS
19
.Sh SYNOPSIS
20
.Nm scp
20
.Nm scp
21
.Bk -words
21
.Bk -words
22
.Op Fl 12346BCpqrv
22
.Op Fl 12346ABCpqrv
23
.Op Fl c Ar cipher
23
.Op Fl c Ar cipher
24
.Op Fl F Ar ssh_config
24
.Op Fl F Ar ssh_config
25
.Op Fl i Ar identity_file
25
.Op Fl i Ar identity_file
Lines 86-91 to use IPv4 addresses only. Link Here
86
Forces
86
Forces
87
.Nm
87
.Nm
88
to use IPv6 addresses only.
88
to use IPv6 addresses only.
89
.It Fl A
90
Enables
91
.Xr ssh-agent 1
92
forwarding (default is disabled).
89
.It Fl B
93
.It Fl B
90
Selects batch mode (prevents asking for passwords or passphrases).
94
Selects batch mode (prevents asking for passwords or passphrases).
91
.It Fl C
95
.It Fl C
(-)a/scp.c (-4 / +10 lines)
Lines 369-375 void usage(void); Link Here
369
int
369
int
370
main(int argc, char **argv)
370
main(int argc, char **argv)
371
{
371
{
372
	int ch, fflag, tflag, status, n;
372
	int ch, fflag, tflag, aflag, status, n;
373
	char *targ, **newargv;
373
	char *targ, **newargv;
374
	const char *errstr;
374
	const char *errstr;
375
	extern char *optarg;
375
	extern char *optarg;
Lines 391-404 main(int argc, char **argv) Link Here
391
	args.list = remote_remote_args.list = NULL;
391
	args.list = remote_remote_args.list = NULL;
392
	addargs(&args, "%s", ssh_program);
392
	addargs(&args, "%s", ssh_program);
393
	addargs(&args, "-x");
393
	addargs(&args, "-x");
394
	addargs(&args, "-oForwardAgent=no");
394
	addargs(&args, "-oForwardX11=no");
395
	addargs(&args, "-oPermitLocalCommand=no");
395
	addargs(&args, "-oPermitLocalCommand=no");
396
	addargs(&args, "-oClearAllForwardings=yes");
396
	addargs(&args, "-oClearAllForwardings=yes");
397
397
398
	fflag = tflag = 0;
398
	fflag = tflag = aflag = 0;
399
	while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1)
399
	while ((ch = getopt(argc, argv, "Adfl:prtvBCc:i:P:q12346S:o:F:")) != -1)
400
		switch (ch) {
400
		switch (ch) {
401
		/* User-visible flags. */
401
		/* User-visible flags. */
402
		case 'A':
403
			aflag = 1;
404
			break;
402
		case '1':
405
		case '1':
403
		case '2':
406
		case '2':
404
		case '4':
407
		case '4':
Lines 475-480 main(int argc, char **argv) Link Here
475
		default:
478
		default:
476
			usage();
479
			usage();
477
		}
480
		}
481
482
	addargs(&args, "-oForwardAgent=%s", aflag ? "yes" : "no");
483
	addargs(&remote_remote_args, "-oForwardAgent=%s", aflag ? "yes" : "no");
478
	argc -= optind;
484
	argc -= optind;
479
	argv += optind;
485
	argv += optind;
480
486
(-)a/sftp.1 (-1 / +5 lines)
Lines 31-37 Link Here
31
.Sh SYNOPSIS
31
.Sh SYNOPSIS
32
.Nm sftp
32
.Nm sftp
33
.Bk -words
33
.Bk -words
34
.Op Fl 1246aCfpqrv
34
.Op Fl 1246AaCfpqrv
35
.Op Fl B Ar buffer_size
35
.Op Fl B Ar buffer_size
36
.Op Fl b Ar batchfile
36
.Op Fl b Ar batchfile
37
.Op Fl c Ar cipher
37
.Op Fl c Ar cipher
Lines 107-112 to use IPv4 addresses only. Link Here
107
Forces
107
Forces
108
.Nm
108
.Nm
109
to use IPv6 addresses only.
109
to use IPv6 addresses only.
110
.It Fl A
111
Enables
112
.Xr ssh-agent 1
113
forwarding (default is disabled).
110
.It Fl a
114
.It Fl a
111
Attempt to continue interrupted transfers rather than overwriting
115
Attempt to continue interrupted transfers rather than overwriting
112
existing partial or complete copies of files.
116
existing partial or complete copies of files.
(-)a/sftp.c (-4 / +8 lines)
Lines 2233-2239 usage(void) Link Here
2233
int
2233
int
2234
main(int argc, char **argv)
2234
main(int argc, char **argv)
2235
{
2235
{
2236
	int in, out, ch, err;
2236
	int in, out, ch, err, aflag;
2237
	char *host = NULL, *userhost, *cp, *file2 = NULL;
2237
	char *host = NULL, *userhost, *cp, *file2 = NULL;
2238
	int debug_level = 0, sshver = 2;
2238
	int debug_level = 0, sshver = 2;
2239
	char *file1 = NULL, *sftp_server = NULL;
2239
	char *file1 = NULL, *sftp_server = NULL;
Lines 2257-2275 main(int argc, char **argv) Link Here
2257
	args.list = NULL;
2257
	args.list = NULL;
2258
	addargs(&args, "%s", ssh_program);
2258
	addargs(&args, "%s", ssh_program);
2259
	addargs(&args, "-oForwardX11 no");
2259
	addargs(&args, "-oForwardX11 no");
2260
	addargs(&args, "-oForwardAgent no");
2261
	addargs(&args, "-oPermitLocalCommand no");
2260
	addargs(&args, "-oPermitLocalCommand no");
2262
	addargs(&args, "-oClearAllForwardings yes");
2261
	addargs(&args, "-oClearAllForwardings yes");
2263
2262
2264
	ll = SYSLOG_LEVEL_INFO;
2263
	ll = SYSLOG_LEVEL_INFO;
2265
	infile = stdin;
2264
	infile = stdin;
2266
2265
2266
   aflag = 0;
2267
	while ((ch = getopt(argc, argv,
2267
	while ((ch = getopt(argc, argv,
2268
	    "1246afhpqrvCc:D:i:l:o:s:S:b:B:F:P:R:")) != -1) {
2268
	    "1246AafhpqrvCc:D:i:l:o:s:S:b:B:F:P:R:")) != -1) {
2269
		switch (ch) {
2269
		switch (ch) {
2270
		/* Passed through to ssh(1) */
2270
		/* Passed through to ssh(1) */
2271
		case '4':
2271
		case '4':
2272
		case '6':
2272
		case '6':
2273
		case 'A':
2274
			aflag = 1;
2275
			break;
2273
		case 'C':
2276
		case 'C':
2274
			addargs(&args, "-%c", ch);
2277
			addargs(&args, "-%c", ch);
2275
			break;
2278
			break;
Lines 2363-2368 main(int argc, char **argv) Link Here
2363
		}
2366
		}
2364
	}
2367
	}
2365
2368
2369
	addargs(&args, "-oForwardAgent=%s", aflag ? "yes" : "no");
2370
2366
	if (!isatty(STDERR_FILENO))
2371
	if (!isatty(STDERR_FILENO))
2367
		showprogress = 0;
2372
		showprogress = 0;
2368
2373
2369
- 

Return to bug 831