Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Allow setting custom subsystem with sftp #1291

Open
cinderblock opened this issue Apr 20, 2023 · 2 comments
Open

Feature Request: Allow setting custom subsystem with sftp #1291

cinderblock opened this issue Apr 20, 2023 · 2 comments

Comments

@cinderblock
Copy link

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.

@joaomariord
Copy link

joaomariord commented May 11, 2023

+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 }).

@joaomariord
Copy link

Made a PR (#1296) on this, let's see how far it goes 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants