It's the sftp subsystem in Linux's SSH implementation that blocks the way
to get Sudo permission in sftp. Jsch is merely a re-implementation of SSH
protocol and for compatibility purpose, it just can't do that. The problem
lies in the sftp-server implementation, which is now deployed in nearly
every linux box. You've got a mission impossible, if you insist on doing
SUDO put/get with Jsch ChannelSftp.

------------------------------
Regards
​,​
h
​adoop90
​

2016-02-15 20:13 GMT+08:00 Lothar Kimmeringer <j...@kimmeringer.de>:

> Am 13.02.2016 um 14:50 schrieb 艾超:
>
> > 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 ?
>
> I don't think so. The SFTP subsystem uses no shell and only
> supports the SFTP commands being defined by the standard.
> AFAIR there is no SUDO-command and SFTP doesn't come with
> a site-command as you might know it from FTP, either.
>
>
> Cheers, Lothar
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> JSch-users mailing list
> JSch-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jsch-users
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to