Comments (10)
I"m also facing the same issue.
Issue:
1. Make a connection to a remote server A and then disconnet it
2. Make a new connection to a different server B
3. The connection will still be made to the same old server A
Even after disconnection the first SSH connection, I"m not able to connect to the second sever (here its server B). Please let me how to destroy the connection object at the end of the program or let me know any alternative to resolve the issue.
Original comment by [email protected]
on 25 Nov 2012 at 7:19
from sshxcute.
I faced the same issue. However I found a workaround as below:
1. Create an instance of ConnBean with hostname, username and password.
2. Pass the reference of ConnBean to getInstance() method.
3. Hold the reference of ConnBean in some variable and change the hostname,
username and password by calling setter methods.
4. If you connect again, the new hostname, username and password will be used.
Original comment by [email protected]
on 18 Dec 2012 at 5:40
from sshxcute.
[deleted comment]
from sshxcute.
solution
step1:- add package to eclipse
step 2:- create your own SSHExec.java file in your project and copy the code to
your file
step3:- make the SSHExec constructor public(remote private)
use SSHExec(ConnBean) instead to .getInstance()
step4:- don't import core.SSHExec to your project
Original comment by [email protected]
on 18 Apr 2013 at 9:19
from sshxcute.
here is the patch for resolving this issue
Original comment by [email protected]
on 15 May 2013 at 2:27
Attachments:
from sshxcute.
Prajwal Great job
Original comment by [email protected]
on 1 Jul 2013 at 3:55
from sshxcute.
I used the patched jar it is working for executing multiple commands. Thanks
for sharing the patched jar
Original comment by [email protected]
on 14 Apr 2014 at 5:28
from sshxcute.
patch file works but what are the differences on this patch?
Original comment by [email protected]
on 23 Apr 2014 at 9:44
from sshxcute.
[deleted comment]
from sshxcute.
Path is worked. Thank you very much [email protected]
Original comment by [email protected]
on 25 Sep 2014 at 3:14
from sshxcute.
Related Issues (20)
- Can I close connection to a server and open connection to another server in my Java program using sshxcute?
- uploadAllDataToServer is throwing error HOT 1
- Why SSHxcute is a singleton class? HOT 1
- Error message: ksh cannot execute
- Sudo in sshxcute is not happening HOT 2
- exec function of SSHExec class not working correctly when used with Servlet HOT 3
- ssh.exec cannot return the result when the command have rpm operation
- Cannot exec multiple commands while connected to catalyst switch
- Logger threshold setting issue
- Executes a bash script remotely but unable to input to it after execution
- sshxcute not working for shellscripts cllaing another shell scripts
- Though connection refused test is passed
- SBC device shown connected successfully BUT SBC command not getting executed successfully...showing error code -1
- What groupID and artifactID to include when using with play framework
- program doesn't wait for login banner to complete
- Connection operation does not succed with "Kerberos username [m.a]:" output in Eclipse
- unable to find jar file when running thru sshxcute
- download feature
- How to use sshxcute to connect to remote server using private key
- sshxcute fails whereas direct unix login and execution of ksh is working fine
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sshxcute.