Skip to main content

Questions tagged [jsch]

JSch is a pure Java implementation of SSH2. JSch allows you to connect to an SSH server and use port forwarding, X11 forwarding, file transfer, etc., and you can integrate its functionality into your own Java programs.

1 vote
0 answers
25 views

spring-integration-sftp failed to send channel

I have a spring-integrations-sftp configuration like below, basically it listens a remote directory and fetch the files and deletes afterwards. @Bean public SessionFactory<ChannelSftp.LsEntry&...
st.'s user avatar
  • 188
1 vote
0 answers
45 views

Unable to read command output using JSch

I'm trying to login to remote session using JSch Channel shell and execute simple shell command and trying to read the command output with the following code - private static Session getSession() { ...
vishr's user avatar
  • 11
-1 votes
0 answers
20 views

Without File of private key use from server -> Caused by: com.jcraft.jsch.JSchException: invalid privatekey

I want to use private key in below codebut this key not in file but in server. I get that form server as string fomate like below: -----BEGIN OPENSSH PRIVATE KEY----- ...
Mansi Adroja's user avatar
-1 votes
1 answer
47 views

Create an SshSessionFactory for JGit with Apache Mina authenticated with a private key on a client perspective

I want to migrate this code under Jsch to Mina: File privateKey = new File("/path/to/local/privateKeyFile"); Repository repository = new FileRepositoryBuilder() .setMustExist(true) ....
Izaya's user avatar
  • 1,478
0 votes
0 answers
30 views

JSCH sftp download/inputstream issue

facing a strange issue. I am able to write in a folder in sftp server via Jsch, but not able to download/inputstream file from that folder. using generic code only. the request keeps on hanging and ...
bishnu's user avatar
  • 1
0 votes
0 answers
60 views

Can't log into ssh via Apache Camel

I've inherited a project using Apache Camel to transfer files via SFTP from(fromFtpUrl) .to("file:/Users/sa/myfolder?doneFileName=${file:name}.done"); when I try to sftp into localhost (mac ...
creas443's user avatar
0 votes
1 answer
1k views

jsch JSchAlgoNegoFailException Algorithm negotiation fail

Using jsch-0.2.17.jar I can connect using WINSCP but not jsch I am setting these properties: config.put("StrictHostKeyChecking", "no"); config.put("PubkeyAcceptedAlgorithms&...
springcorn's user avatar
-1 votes
1 answer
258 views

Unable to add jsch-0.1.55.jar to existing Eclipse java project

I downloaded jsch-0.1.55.jar from https://sourceforge.net/projects/jsch/files/jsch.jar/0.1.55/jsch-0.1.55.jar/download, copied the JAR file into my lib directory, running Eclipse Version: 2023-12 (4....
livlif2fullest's user avatar
1 vote
1 answer
44 views

Running any exe with Jsch in a AWS windows server not working

We have a Windows server in AWS and we are interacting using Jsch. We are able to write a file there. We can also execute this command: tasklist | findstr myprogram to check if myprogram is running ...
Ángel Fas's user avatar
0 votes
0 answers
176 views

Caught an exception, leaving main loop due to End of IO Stream Read - How to catch it?

I have a problem doing file transfers with a SftpOutboundGateway within a Spring task. The files which I do transfer are pretty normal in respect to size. I am using com.github.mwiede::jsch.jar-0.2.17....
JBStonehenge's user avatar
-2 votes
1 answer
116 views

Unable to connect ot remote DB with ssh tunnel

I'm trying to connect to my remote DB with a ssh tunnel, I'm able to achieve this through my DB manager easily but when i try replicating it with my code I'm facing issues, my SSH connection public ...
Akash Jain's user avatar
0 votes
0 answers
208 views

jcraft jsch throws "inputstream closed" exception

When downloading a file close to 2 GB size from remote FTP site, we are seeing the below error and not able to proceed. Interesting thing is file gets downloaded but probably during final stages it ...
KVNS_JavaLearner's user avatar
1 vote
0 answers
226 views

Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism at javax.crypto.JceSecurity in JavaCompiler API

I am trying to connect to SSH (Unix environment) using the JSch library in JavaCompiler API. I can connect to the unix environment through a normal Java program but cannot from JavaCompiler API. Looks ...
Sudhanshoo Sarage's user avatar
0 votes
1 answer
290 views

Failed to connect and initialize SSH connection in Jenkins

After Updating Jenkins from Java 1.8.x.x to 1.11.x.x & updating Jenkins LTS version from 2.3xx.x to 2.4xx.x, Updated all Plugins as in Manage plugins recommandations. Post-build Actions "Send ...
Raghav Tallam's user avatar
2 votes
1 answer
626 views

SFTP Connection through OPENSSH IdentityFile in Java [duplicate]

I'm developing a Java application that has to store data inside an SFTP. The test environment has a password authentication, meanwhile the production environment has an authorized OPENSSH key (the ...
Marco Frag Delle Monache's user avatar

15 30 50 per page
1
2 3 4 5
112