[Bug 3569] New: Semi-interactive sftp batch mode
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Mon May 1 03:59:13 AEST 2023
https://bugzilla.mindrot.org/show_bug.cgi?id=3569
Bug ID: 3569
Summary: Semi-interactive sftp batch mode
Product: Portable OpenSSH
Version: 9.3p1
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5
Component: sftp
Assignee: unassigned-bugs at mindrot.org
Reporter: alex.openssh at madalex.me.uk
Created attachment 3695
--> https://bugzilla.mindrot.org/attachment.cgi?id=3695&action=edit
Adds an option to allow interactive authentication before entering
batch mode
I sometimes find sftp batch mode useful for complex operations while
working interactively, on an ad hoc basis. For example, when a large
number of files are to be copied, it can be convenient to generate the
batch of commands locally and then execute them all together.
In such cases, batch mode is a little restrictive, being designed
purely for non-interactive use from scripts. There are three
enhancements I have made and find useful:-
1) An option to allow interactive authentication before entering batch
mode.
2) An option to keep the connection open and go into interactive mode
after executing the requested batch / single transfer.
3) A command to execute a batch of commands from a local file.
I attach patches for these, in case somebody else also finds them
useful.
I am providing these as a single patch series because a) it means less
work to close as "won't fix" if nobody cares except me and b) they
slightly overlap in terms of touching the same lines and hence have to
be applied in sequence. That said, they are logically distinct and it
would be easy enough to adapt 2) or 3) to be applicable stand-alone;
just ask.
Notes:-
One should of course have to turn 1) on explicitly because a script
running non-interactively should fail in the case that non-interactive
authentication is not possible, rather than hanging waiting for input.
1) and 2) are of course incompatible with batch mode from stdin.
Enabling either in combination with `-b -' results in an error.
As a potentially useful side-effect, 3) allows batch files to "include"
other batch files. Circular dependencies are caught and result in an
error.
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list