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
0
votes
1 answer

Out of memory exception using J2ssh jar

We are using j2ssh jar(j2ssh is an external jar used to connect Secured Shell)in our webapp.The webapp is running in weblogic server. I open the connection like this SshClient ssh = new SshClient(); SessionChannelClient session=null; session =…
Harish
  • 3,343
  • 15
  • 54
  • 75
0
votes
1 answer

J2ssh get empty input stream

I'm trying to read data from the server with SSH protocol. For this, I'm using the j2ssh library. My server connects with the other server in ssh without any problem. The problem is when I try to read any data from the shell command line. Whatever…
Simone
  • 29
  • 1
  • 7
0
votes
1 answer

com.sshtools.publickey.InvalidPassphraseException: Unsupported type: OPENSSH PRIVATE KEY

I have created a SSH key in my local host in another user login (Instead of root user). The public (id_rsa.pub) and private (id_rsa) key files in the directory (/home/user/.ssh/). I have copied the public key file to the remote host in the directory…
Anand Murugan
  • 223
  • 1
  • 8
  • 16
0
votes
0 answers

J2SSH Maverick behavior on network glitch

We are using Maverick to use SSH to launch shell scripts when building servers. Some of these scripts can take a long while to run (over 30 minutes). Sometimes the Maverick call returns early (with rc=1), but the script at the other end keeps…
xenoid
  • 8,396
  • 3
  • 23
  • 49
0
votes
1 answer

ssh connection fails with j2ssh giving TransportProtocolException

I'm using j2ssh-core-0.2.9.jar to ssh to a Host. In the logs I can see : Client Algorithms: [diffie-hellman-group1-sha1] Server Algorithms: [curve25519-sha256@libssh.org, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521,…
pep8
  • 371
  • 3
  • 18
0
votes
1 answer

Is there a way to connect to SFTP server without password or private key reference

I want to upload file over an SFTP server without password authentication. Here I don't want to use private key either. My public key is already shared to the destination SFTP server. And I can login to it by using username@hostname as url from…
Raditz
  • 11
  • 2
0
votes
1 answer

j2ssh remote to remote file transfer

The following code is working fine for localhost to remote server. But my application runs on a separate server so I need to pick files from remote1 server and then put it in remote2 server. How would I do this with J2SSH? package…
user451872
  • 9
  • 2
  • 5
0
votes
1 answer

fetching files from SFTP

I want to fetch files from SFTP which are created after a given timestamp(time of last pull) in java. I am using j2ssh as of now. Please let me know if some other API supports such a feature.
singhal
  • 107
  • 2
  • 9
0
votes
1 answer

Facing com.sshtools.j2ssh.transport.TransportProtocolException for j2ssh plugin

As I come to know that LeeDavidPainter is the author of j2ssh plugin. I wanted to ask a question in which I am stuck on. I am trying to connect to a system using the j2ssh plugin with just IP and password. I see this stack trace: INFO: Loading key…
T_C
  • 1
  • 1
  • 1
0
votes
1 answer

J2SSH supported ciphers/Macs

I am running a java application which uses J2ssh library to establish the connection to the server. Last week we migrated to a new IBM server Here the problem is we are unable to establish FTP/SFTP connection to the new server from my java…
Karthick88it
  • 601
  • 2
  • 12
  • 28
0
votes
1 answer

SSH protocol version

Currently my application is working with J2SSH and now clients wants to migrate the existing server to IBM. This new server will support only SSH protocol version 2. I have a query whether J2SSH will support SSH protocol version 2 ?. Is there a way…
Karthick88it
  • 601
  • 2
  • 12
  • 28
0
votes
2 answers

inputstream make the program to wait

I am using J2ssh library to connect to a Unix machine, run a command and get the result using input stream. But the programs runs into loop while reading the input stream. I am able to get the result from the input steam, but the program struck…
arunan
  • 922
  • 1
  • 17
  • 25
0
votes
2 answers

running a sudo command over j2ssh

I'm attempting to write some Java code that connects to a linux workstation, executes a command with sudo and then blocks until the command is complete. session.getOutputStream().write("sudo -s…
caris
  • 31
  • 1
  • 5
0
votes
2 answers

j2ssh sshclient doesn't wait for remote command to to complete

I have method that uses j2ssh sshclient to execute a remote command on a linux server. The remote command can take anywhere from a few seconds to over a minute to execute. I need the Java program to wait until the command is finished executing…
caris
  • 31
  • 1
  • 5
0
votes
1 answer

J2ssh ssh client disconnected frequently

I am using a single thread application to connect my client server Architecture. Basically this application will create many connections & close it automatically once the job is completed. We are getting an exception…
Karthick88it
  • 601
  • 2
  • 12
  • 28