艾超
2016-02-13 13:50:39 UTC
Hello there!
I've been using Jsch for several months on a business project, and I've got this problem:
When using ChannelExec, I can mock a SUDO execution just like in the Jsch examples ( which is using the sudo -S -p '' <command> trick ), it's totally OK and working.
However as to ChannelSftp, I can't find any examples showing how to do a SUDO put/get (when of course, the sftp user on that linux box has super permission and can do sudo ... in the interactive shell ).
Is there a way to do SUDO put/get using ChannelSftp ? if yes, how to do that ? Maybe it needs some modification/extension to Jsch source, but is it possible ?
Any advice will be appreciated, thanks in advance.
Aich,
Best Regards
I've been using Jsch for several months on a business project, and I've got this problem:
When using ChannelExec, I can mock a SUDO execution just like in the Jsch examples ( which is using the sudo -S -p '' <command> trick ), it's totally OK and working.
However as to ChannelSftp, I can't find any examples showing how to do a SUDO put/get (when of course, the sftp user on that linux box has super permission and can do sudo ... in the interactive shell ).
Is there a way to do SUDO put/get using ChannelSftp ? if yes, how to do that ? Maybe it needs some modification/extension to Jsch source, but is it possible ?
Any advice will be appreciated, thanks in advance.
Aich,
Best Regards