All Questions
16 questions
0
votes
1
answer
276
views
SSH Keyboard Interactive access method not supported with Spring client
i am developing a Spring service that should be able to connect to a keyboard interactive ssh server, i am successfully opening a session and a channel, but using the inputStream, I receive "...
2
votes
3
answers
15k
views
JSch connection issue: JSchException: Algorithm negotiation fail – Even with JCE installed
I am trying to connect to a server using JSch but it gives issues with connection. I am able to connect to the server using PuTTY but not using Java code.
I am using jdk1.8.0_171
Here is the code ...
-1
votes
1
answer
70
views
java sshd multiple command
If someone have an actual solution to this problem i would much appreciate it. So far all implementation that I have used close the session as soon as one of the channel is "connected" what ever that ...
0
votes
1
answer
1k
views
How to pass variable through ChannelExec.setCommand() method in JSch in Java?
Below is my code. Please check
ChannelExec channelExec = (ChannelExec)session.openChannel("exec");
InputStream in = channelExec.getInputStream();
channelExec.setCommand("sh "+ "a.sh; echo \\$No");
a....
1
vote
1
answer
965
views
How to print output of multiple JSch sessions in a loop?
Below code is intended to execute a command in multiple users of a particular server. This code is not connecting to each user, instead it is only running command in first user.
try {
String ...
4
votes
2
answers
3k
views
How can I make a session in JSch to last longer?
I am new to JSch and i am using it to connect to a remote linux machine. I am creating a session and opening a channel to execute a command on the linux machine. This command takes nearly half an hour ...
0
votes
1
answer
3k
views
JSch java connection automation - getting username/password prompt, even after setting them before connection [duplicate]
I have problem of connection with JSch , there is the code that i'm using for establishing the session, i already set the login and password, but after executing it , the input console still prompt ...
1
vote
0
answers
2k
views
SSH sessions not closing after sftp transfer
Java code transfers (SFTP) files from local to remote server every 15 mins.
Both are linux servers with below configs:
user# ssh -V
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
user# uname -a
Linux ...
1
vote
1
answer
890
views
Ganymed-ssh - how to set timeout to close session when execCommand takes more time
I'm using Ganymed-ssh to pull log details remotely. Below is my code. Sometimes the data returned by stdout is huge and so it takes more time to return. I want to close the session if the stdout did ...
22
votes
3
answers
43k
views
JSch: How to keep the session alive and up
I'm writing Java GUI program for static route management using SSH. My code is as follows:
import com.jcraft.jsch.*;
import java.io.*;
public class Konsep {
String status;
static String ...
5
votes
1
answer
2k
views
Java Ganymed Trlead Orion ssh session timeout
I am using the SSH Ganymed library alias Trilead alias Orion.
I am trying to understand the exact behaviour of the session as I would need to keep an ssh connection opened for a long time (maybe for ...
3
votes
1
answer
736
views
Should you use a separate SSH session for each upload from a web app
In web-apps its often need to upload files via SSH(by SFTP protovol) to remote hosts with static content.
The question is: what is the best practice to work with SSH connection in such situation?
Do I ...
1
vote
1
answer
5k
views
Jsch - Multiple channels per session
There is a problem, when I try to fire second command in the same session using Jsch API
package examples.com;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
...
0
votes
3
answers
1k
views
SSH Session Capture
I need to capture and monitor the ssh session through Java or C#.
Just like Fiddler for Http.
Any suggestion ?
2
votes
3
answers
2k
views
How do I change directory (cd) with Ganymed SSH API?
I must be missing something here, but how do I call something like "cd /root/some/dir/" with Ganymed SSH API?
I created a Connection object
In the first session created, I called "cd /root/some/dir"
...