Passing SFTP options when using SCP
Darren Tucker
dtucker at dtucker.net
Wed Dec 7 12:09:11 AEDT 2022
On Wed, 7 Dec 2022 at 10:46, Thorsten Glaser <t.glaser at tarent.de> wrote:
> On Tue, 6 Dec 2022, Chris Rapier wrote:
> > Just curious. If there isn't I'll try to come up with a method and share it
> > when I'm done.
There's not currently. Those are arguments 3 and 4 to do_init(). In
sftp.c they're:
conn = do_init(in, out, copy_buffer_len, num_requests, limit_kbps);
but in scp.c they're hard coded as:
return do_init(*reminp, *remoutp, 32768, 64, limit_kbps);
> Mapping them all into ‘-o’-style long options would be good.
> Perhaps even use -o and ssh(1) should just reject those that
> are file transfer-only.
That would probably be messy. Right now -o options are handled by
ssh's config file parser and scp/sftp have no knowledge of any of
that, they just pass -o options through to ssh. You'd probably have
to add a dependency on readconf.c, and you'd end up with two classes
of config keywords that work differently. That would likely be a
source of confusion ("Why can't I set SFTPBufferSize in
~/.ssh/config?").
scp's -B -r and -R are all taken. -s and -S (for "sftp thing") are
also taken. -b is available, as is -n/-N ("number of requests").
--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
More information about the openssh-unix-dev
mailing list