• 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

HELP! : Newbie Problems with JSCH

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to use using JSCH to upload some files via SFTP. Whenever I try to call the Session.Connect() method, I receive the following exception:

com.jcraft.jsch.JSchException: Auth cancel
at com.jcraft.jsch.Session.connect(Unknown Source)
at com.jcraft.jsch.Session.connect(Unknown Source)
at com.mypackage.MySuperClass.executeInternal(SFTPPushCommand.java:68)
at com.mypackage.MySubClass.executeInternal(QuickPlaySFTPPushCommand.java:27)
at com.airborne.automation.Command.execute(Command.java:99)
at com.airborne.automation.Command.execute(Command.java:146)
at com.airborne.automation.Command.execute(Command.java:146)
at com.airborne.automation.Project.run(Project.java:111)
at java.lang.Thread.run(Thread.java:595)



Here's the basic code I'm using:



I'm not using any complicated public/private key authentication or anything, and command-line SFTP seems to work fine. Can anyone help me out with this?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to "Other Java Products and Servers."
 
Philippe Desrosiers
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After further investigation, it looks like the target SFTP server is specifying authentication methods "publickey,gssapi-with-mic,password". I don't really know what this means. Do I need to set up some sort of public key? How do I do this?
 
reply
    Bookmark Topic Watch Topic
  • New Topic