Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect DMZ node with SSHJ #864

Open
sivaprasadjava opened this issue May 29, 2023 · 4 comments
Open

Unable to connect DMZ node with SSHJ #864

sivaprasadjava opened this issue May 29, 2023 · 4 comments

Comments

@sivaprasadjava
Copy link

Hi Team,

I hope all are doing great, I'm using SSHJ to execute remote commands execution and file uploads/downloads. everything is working fine but while connecting to the DMZ Remote node( we have proper access to connect ) facing connection timeout issues.

I'm using the .34.0 version, can someone please help me to overcome this issue. thanks for your all time and efforts.

Thanks,
Siva.

@hierynomus
Copy link
Owner

Sorry, my crystal ball seems broken.... In other words, please provide a ton more details except what role your host has and that you're getting a timeout...

  • What are you trying
  • What logging do you see
  • etc

@sivaprasadjava
Copy link
Author

Hi @hierynomus

Thanks for your replay :)

I have to connect and execute some unix commands on the DMZ node with Java code, we have the required permissions to connect and execute commands on it, and with Apache Mina I'm able to execute commands and file uploads/downloads as well. when I used SSHJ to execute Unix commands and file upload/downloads, I'm not able to connect the DMZ node I'm getting below print stack trace.

net.schmizz.sshj.transport.TransportException: Connection reset
at net.schmizz.sshj.transport.TransportImpl.init(TransportImpl.java:165)
at net.schmizz.sshj.SSHClient.onConnect(SSHClient.java:807)
at net.schmizz.sshj.SocketClient.connect(SocketClient.java:69)

Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.net.SocketInputStream.read(SocketInputStream.java:224)
at net.schmizz.sshj.transport.TransportImpl.receiveServerIdent(TransportImpl.java:193)
at net.schmizz.sshj.transport.TransportImpl.init(TransportImpl.java:158)
... 12 more

I'm using the 0.43.0 version of sshj. let me know if anything is required.

Thanks,
Siva.

@sivaprasadjava
Copy link
Author

Hi @hierynomus / @DanWiseProgramming, can you please help me to overcome this, thanks for your time.

@DanWiseProgramming
Copy link

Hi @sivaprasadjava ,
In order to help you, I need more information:

  1. Provide the full output from an ssh -vvv <target user>@<target host> <target command> command which accomplishes what you are trying to do.
  2. Provide the code which you are using to accomplish the same with SSHJ.
  3. Provide a full stack-trace of the error thrown by SSHJ.
  4. Provide proof that the server is online and accessible at the time of attempting to run the SSHJ code.

Without this information, I'm afraid I won't be able to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants