Feature Request: Allow setting custom subsystem with sftp
On Linux systems, the SFTP client sftp has the -s option which enables certain features on the remote system.
Most notably, running sftp-server with sudo.
I'm not seeing a way to do that here. Would is be possible to add this feature?
Buried in the docs here, I see what looks like it could be some partial support for this, but maybe that is part of the Server documentation.
+1 Also extremely interested in this.
I checked the code and found no references of any /usr/bin/sftp-server (and similar known paths).
Maybe this could be done with some tweaking, the call to client.sftp(cb) is requesting the default 'sftp' subsystem, maybe (not verified yet) the call to reqSubsystem could make use of a path instead of the sftp subsystem identifier.
Will try to hack this over the weekend. If it works would just be a matter of allowing the subsystem to be sent as an argument,, like client.sftp(cb, { subsystem }).
Made a PR (#1296) on this, let's see how far it goes 😄