Questions tagged [j2ssh]

J2SSH is an object-orientated Java implementation of the SSH version 2 protocol.

J2SSH is an object-orientated Java implementation of the SSH version 2 protocol. It provides a rich, powerful, and extensible SSH API that enables developers to gain access to SSH servers and to develop entire SSH client/server frameworks. The API library provides a fully-featured SSH2 implementation specifically designed for cross-platform development. Higher level components, representing both the standard SSH client and SSH servers, are provided which implement the protocol specification for user sessions and port forwarding. The specification currently supports public key and password authentication and a full implementation of the SFTP protocol.

37 questions
6
votes
5 answers

"The Transport Protocol thread failed" – "The socket is EOF" with J2SSH connection using Java

I am trying to establish an SSH connection through my Java code, but getting below exception .. I tested my connection through Putty/Winscp tools and it works fine. The problem is with my Java code... SEVERE: The Transport Protocol thread…
Karthick88it
  • 601
  • 2
  • 12
  • 28
3
votes
2 answers

How to enable debug logs for j2ssh maverick?

Recently I am using j2ssh-maverick-1.5.5.jar for implementing sftp within my own java application, but I got a problem on enabling debug message via log4j.properties. It seems it didn't work on log4j.logger.com.sshtools=DEBUG I can find similar…
rookie
  • 31
  • 3
3
votes
3 answers

Executing multiple commands using j2ssh

I would like to know how to execute multiple commands using j2ssh. The code I got from the net is as follows: import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import…
Raoul
  • 331
  • 1
  • 6
  • 7
2
votes
1 answer

Java J2SSH SFTP - Host key is invalid

I'm using J2SSH 0.2.9 SFTP. When connecting to specific SFTP site, I'm receiving the error The host key signature is invalid However connecting to the same site using WinSCP or Filezilla doesn't give me any kind of error. The specific area of code…
Jamie
  • 611
  • 1
  • 5
  • 20
2
votes
2 answers

J2SSH - Add Key Exchange Algorithm

I am trying to SCP a file from my application to a server using j2ssh. The remote server is running TECTIA. From the command line (Solaris machine where my app is deployed) the scp works fine using the key pair we exchanged. From my application,…
Adam McCormick
  • 315
  • 5
  • 10
1
vote
3 answers

Java - Authentication with public key and passphrase - j2ssh

How do I connect to server with public key and passphrase (I have the public key and I know the passphrase. I'm using com.sshtools.j2ssh library but I can't see an option to set passphrase. The problem is, even though I have the public key, the…
Ron
  • 29
  • 1
  • 4
1
vote
1 answer

Thread blocked while disconnect NETCONF session in J2SSH

I have used J2ssh library (0.2.7) to establish NETCONF connection in my application. While profile monitoring I noticed that few threads got blocked in disconnect() of j2ssh session. It is not a consistent issue, it happens at times. I have given…
Kather
  • 95
  • 8
1
vote
0 answers

Connecting to a SFTP server via SOCKS5 proxy from a java client (code) without proxy authentication

I am trying to connect to a SFTP server via socks5 proxy server from a standalone sftpclient, I am doing that using maverick-all library. My code works fine. Below is the code snippet : private SshClient getSSHClient() throws Exception { …
1
vote
1 answer

J2SSH Core library - Unable find other custom key exchange algorithms implementation

I am searching the implementation of key exchange algorithms for j2ssh core 0.2.9 as below. diffie-hellman-group-exchange-sha1 diffie-hellman-group14-sha1 diffie-hellman-group1-sha1 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 Above all…
1
vote
1 answer

Connect to ssh without Host Key Verification using j2ssh maverick

I have two servers with trusted connection. I want to transfer files through SFTP by connecting through ssh without Host Key Verification. I am using Java 1.7 and Redhat Linux OS. Previously i was using j2ssh-core0.2.9.jar in which i could connect…
SidB
  • 55
  • 1
  • 9
1
vote
0 answers

How to stop J2SSH SFTP put command from changing permissions

I get the error: java.io.IOException: This server does not support operations to modify file attributes. at com.sshtools.j2ssh.sftp.SftpSubsystemClient.getOKRequestStatus(Unknown Source) at…
simonshout
  • 95
  • 3
  • 14
1
vote
1 answer

How to use sshtools SftpClient with passphrase?

I am trying to use j2ssh SshClient without success. I am trying to open a connection using private RSA key + passphrase. I found something which I am not sure is the write approach: Properties properties = new…
Tomer
  • 2,398
  • 1
  • 23
  • 31
1
vote
0 answers

J2SSH ChannelInputStream read method locked with tail -f

J2SSH ChannelInputStream read method is able to get the output from a command. However, if I try to execute a "tail -f file.txt > output.txt &" (bash) via J2SSH, read method gets locked. I think this is because there is no output to read in a "tail…
1
vote
1 answer

Downloading zip or exe file from SFTP location

Below are the two snippets from my applications and am using J2SSH jar for SFTP access. first one: ......... ......... //Open the SFTP channel com.sshtools.j2ssh.SftpClient client = sshClient.openSftpClient(); // writing from source path to…
NamingException
  • 2,388
  • 1
  • 19
  • 41
0
votes
1 answer

InputStream read() blocks when server returns no input

I am working on a program for Android, which connects to a server via SSH to get some data. The problem is, in the event a command is sent to the server, that doesn't return anything (such as cat on an empty file), my program hangs, seemingly being…
coreno
  • 445
  • 1
  • 3
  • 14
1
2 3