i'm trying to ssh connect from my android phone to a ssh server.
My import line:
import com.jcraft.jsch.*;
and here the rest
try{
JSch jsch = new JSch();
//create SSH connection
String host = "192.168.158.20";
String user = "jan";
String password = "mypassword";
Session session = jsch.getSession(user, host, 22);
session.setPassword(password);
session.connect();
System.out.println("done");
}
catch(Exception e){
System.out.println(e);
}
I'm using Jsch (java ssh implementation) for that. I've downloaded the jsch-0.1.48.jar from the website and added it to my eclipse android project's build path via "right click project -> libraries -> Add Jars"
I can now see the jsch-0.1.48.jar file inside my Referenced Libraries so that seems to be ok.
When i start the debug i get a Could not find class 'com.jcraft.jsch.JSch' error from LogCat at the line 1.
Eclipse shows me no warnings or syntax errors.