B4J Question SFTP (jSCH) problem

moore_it

Well-Known Member
Licensed User
Longtime User
Hi all,

how i do connect to an SFTP (SSH2) server with jSch.lib (ver 1.30) ?
I,ve this error :

com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:519)
at com.jcraft.jsch.Session.connect(Session.java:183)
at anywheresoftware.b4a.objects.SFtpWrapper.connectIfNeeded(SFtpWrapper.java:378)
at anywheresoftware.b4a.objects.SFtpWrapper.access$5(SFtpWrapper.java:373)
at anywheresoftware.b4a.objects.SFtpWrapper$1.run(SFtpWrapper.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

The user and password are right i've try in filezilla.
Is my sftp server the problem ?

thanks in advice
 

moore_it

Well-Known Member
Licensed User
Longtime User
the app work in batch, i've used
B4X:
Sub SFTP_PromptYesNo (Message As String)
    'Dim res As Int = fx.Msgbox2(frm,Message, "", "Yes", "", "No", Null)
    'The next line might be a bit confusing. It is a condition.
    'The value will be True if res equals to DialogResponse.POSITIVE.
    'mySFTP.SetPromptResult(res = fx.DialogResponse.POSITIVE)
    mySFTP.SetPromptResult(True)
End Sub
 
Upvote 0
Top