: paul-eberm...@gmx.de
> To: jsch-users@lists.sourceforge.net
> CC: dwr...@hotmail.com
> Subject: Re: [JSch-users] sudo su -
>
> bob manc skribis:
>
> > I am trying to use jsch to scp or sftp files to and from my ubuntu
> > server. I have to login as ubuntu but want
I am trying to use jsch to scp or sftp files to and from my ubuntu server. I
have to login as ubuntu but want to do a 'sudo su -' command so I can overwrite
files owned by root.Is there a way to do this on a session that will allow me
to be root on subsequent calls?
aft.com
>
> Hi,
>
> +-From: bob manc
> |_Date: Tue, 15 Feb 2011 10:37:33 -0500 __
> |
> |This is what I am doing...
> |Lets say my remote server is at "dev.myserver.com".
> |I have MySQL and Tomcat running on it. Port 22 and 80 are open on it.
> ...
> |lp
This is what I am doing... Lets say my remote server is at "dev.myserver.com".
I have MySQL and Tomcat running on it. Port 22 and 80 are open on it.
JSch jsch = new JSch();
jsch.addIdentity("dev.pem");
String user = "root";
String host = "dev.myserver.com";
int sshPort = 22;
Session session = j