• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

issue with sshxcute while connecting to a linux server

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying the Google's sshxcute framework to connect to a linux server to execute some commands without the need for manual intervention via putty.

When i login to the server via putty i can login successfully but the same fails when executing via the code. The code is as below and this is just the same as the sample code on the Google's sshxcute

//******************
// Initialize a ConnBean object, parameter list is ip, username, password
ConnBean cb = new ConnBean("ip address", "username","password");
// Put the ConnBean instance as parameter for SSHExec static method getInstance(ConnBean) to retrieve a singleton SSHExec instance
ssh = SSHExec.getInstance(cb);
// Connect to server
ssh.connect();
//************************


The logs say this


SSHExec initializing ...
Session initialized and associated with user credential <password>
SSHExec initialized successfully
SSHExec trying to connect myloginid@hostname
Connect fails with the following exception: com.jcraft.jsch.JSchException: Auth fail
false



I am not sure if this is due to not caching the public key of the server when one connects to the server for the first time (as it happens in putty) or is it that the server is only allowing keyboard interactive sessions i am not sure.

kindly suggest how to enable the saving of the public key feature if that is the real issue.





 
reply
    Bookmark Topic Watch Topic
  • New Topic