Hello there, I am another victim of the auth fail.
What happens:
I received this working code from a project partner and put it into a REST
service running within a Tomcat7:
jsch.addIdentity(this.identity);
Session session = jsch.getSession(this.user, this.host,
22);
session.setConfig("StrictHostKeyChecking", "no");
session.connect();
Channel channel = session.openChannel("sftp");
channel.connect();
ChannelSftp sftp = (ChannelSftp) channel;
where identity is the path to a file containing a PEM RSA private key.
The REST service is developed with Jersey.
When I run the service that uses this code I get a "Auth failed".
But it works when I run a slightly modified version of the program available
there http://www.jcraft.com/jsch/examples/Logger.java
(changes: added the addIdentity call to the JSch object, the
session.setConfig("StrictHostKeyChecking", "no"); to the Session
and left the UserInfo of the session unset).
I use the same JVM, Sunoracle
But it works when I run a slightly modified version of the program available
there http://www.jcraft.com/jsch/examples/Logger.java
(changes: added the addIdentity call to the JSch object, the
session.setConfig("StrictHostKeyChecking", "no"); to the Session
and left the UserInfo of the session unset).
I use the same JVM, Sunoracle jdk1.6.0_27 both for running tomcat and the
standalone class. And I run Tomcat with my GNU/Linux user.
Any hint about what may change in Tomcat7 from my shell ?
Thank you in adavnce
--
ing. Gian Uberto Lauri
Ricercatore / Reasearcher
Laboratorio Ricerca e Sviluppo / Research & Development Lab.
Area Calcolo Distribuito / Distributed Computation Area
[email protected]
Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD)
Tel. +39-049.8283.571 | main(){printf(&unix["\021%six\012\0"],
Fax +39-049.8283.569 | (unix)["have"]+"fun"-0x60);}
Skype: gian.uberto.lauri | David Korn, AT&T Bell Labs
http://www.eng.it | ioccc best One Liner, 1987
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users