Login  
Search All Forums
Dart Home | PowerTCP SFTP & SSH for .NET | Custom Development Reply | PowerTCP SFTP & SSH for .NET Topics | Forums   
AuthorForum: PowerTCP SFTP & SSH for .NET
Topic: Authentication hangs after user/password is accepted.
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted October 17, 2018 2:58 PM

We are connecting a terminal using SSH for .Net. We call the Authenticate(SSH_LoginData data) method. The username/password are accepted, but the process hangs after SSH_MSG_CHANNEL_OPEN is sent.

This same code works on a variety of in-house Linux servers. But not for one of our customers. They are using:

HP-UX a300u026 B.11.31 U ia64 3770106517
OpenSSH_7.3p1+sftpfilecontrol-v1.3-hpn14v11, OpenSSL 1.0.2k 26 Jan 2017

The last output from the "Log" event is:
SSH_MSG_CHANNEL_OPEN 23 bytes payload.
5A-00-00-00-07-73-65-73-73-69-6F-6E-00-00-00-00-00-00-84-B8-00-00-84-B8

The system hangs at this point, and authenticate does not return. Any clue as what we can do next to debug this issue?
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 18, 2018 12:01 PM

Hello,

What version are you testing with? If not 4.10.3.1, please test with the current version.

Just to be clear, you state 'system hang' at the end, but I'm assuming you meant application hang as you state in the rest of your report?

Does the issue occur with our included SSH Client sample?

OpenSSH_7.3p1 is out of date; is it possible for the customer to upgrade their server to OpenSSH 7.8?
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted October 19, 2018 10:06 AM

Thanks you for the quick response. The File Version reported by Windows is 4.10.2.0. It is the latest download available on this website "please do not post your serial number".

The Authenticate method simply does not return. I added event handlers for the various events and the last one firing is the "Log" event. On working systems there is further SSH traffic after this.

I will see about sending the samples for them to try. I will also ask about upgrading their server. They tried on another HP platform and got the same error.

The same code runs on multiple other platforms so we suspect some incompatibility between client and server. PuTTY does connect.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 19, 2018 10:58 AM

I'll await your updates. I've also edited your post; what you posted was your serial number (should not be made public), not the link to your download, I assume you got it from the customer center. 4.10.2.0 should be recent enough (the most recent version only has some feature additions).
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted October 22, 2018 12:33 PM

Thanks.
They ran the sample and got the same results. The screen hung. I recommended they try updating the SSH version on the server.
I also asked them to try PuTTY with the various "Connection/SSH/Bug" settings set to "Off" from "Auto" in the hope that some SSH workaround was allowing PuTTY to work. They said they set the values to "Off" and were still able to login to the server.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 29, 2018 1:50 PM

Hello,

Any news on updating their server?
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted October 29, 2018 5:27 PM

They are asking me if it is fixed yet. I am asking if they have tried updating their server side SSH.

What bugs them is that PuTTY does work. I suspect PuTTY has some kind of check for non standard behavior and is more forgiving. From the looks of the debug messages, both sides are waiting for each other to do something. Neither side reports an error, they both simply wait.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 29, 2018 5:41 PM

Hello,

That's correct, we're waiting for a response for our session request (you can decode the bytes from octal to ascii straight up), and as it appears the server isn't doing anything to respond to that request. We might be able to provide more assistance if we could connect to the server and authenticate against it (but most customers can't provide such access). The simplest solution in such unexpected circumstances is to make sure both sides are up-to-date, and if they are then there's probably something else going on; in which case it warrants a deeper investigation as far as we can.
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted November 2, 2018 12:16 PM

I just heard back from our customer. They appear to contract with a 3rd party to maintain their system, so updates are not easy. They state that OpenSSH 7.4p1 is the most update to date version they support. I am asking if we can directly connect to the server. They are in China so we need to pick a time suitable for all for a shared session. Better yet if they could open up a test machine for a few days. I'll keep you posted.


Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted November 2, 2018 12:53 PM

Hello,

It's unfortunate that's the most recent version they'd support, but hopefully that will resolve it. If not, yes, connecting to their server would be the next step; you can contact us at support@dart.com to provide the relevant server/auth details.
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted November 15, 2018 10:15 AM

Just heard back form our customer. Updating did not help, they have the same problem running the sample code, as well as our code.

They would like to screen share with me and hopefully one of you team. They can not open their system to the outside world for remote access. As much as me seeing what they see, I do not know this will be helpful. Do you have any diagnostic or test software we can apply to get to the bottom of this?
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted November 15, 2018 12:46 PM

Hello,

Unfortunately, seeing the issue occur won't help us diagnose the issue, and the diagnostics you refer to would be the log itself, which is showing that there's no response to our request.

Can your customer enable logging on their SSH server to see if there are any errors occurring on their end?

A wireshark log could be tangentially useful; it could confirm that the server isn't responding to our request (if they do want to generate this, make sure the traffic is filtered to just against the server so the resulting file isn't too large); you can send that (or a download link for it) into support@dart.com.
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted November 15, 2018 12:55 PM

I've forwarded your request to them. I'll let you know when I receive the logs. Thanks again.
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted November 20, 2018 9:22 AM

Customer came back with new information. They are getting a Windows dialog box titled "Unknown Server Host Key", Containing:
The server's host key is unknown.
Host 10.20.192.86:22
Host Key Algorithm: edsa-sha2-nistp256
MD5 Hash: ........
SHA256 Hash: .......
Always trust from this host?

Then it hangs. They also supplied some server logs. Where can I post the server logs?
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted November 20, 2018 12:36 PM

Hello,

Are they able to interact with the dialog? They should accept the hostkey.

You can send the logs into support@dart.com. (Or a link to a location we can download them from)
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted November 28, 2018 9:21 AM

I posted the logs to your site. Have you had a chance to look at them?
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted November 28, 2018 10:56 AM

Hello,

Yes, but they don't say too much. In the syslog, I see the connection being closed, presumably on the client-side, which would be expected if the hostkey wasn't accepted; has your customer tried accepting the hostkey?
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted December 3, 2018 12:54 PM

Yes they claim they accepted the password. Would it be possible to arrange a screen sharing session with them?
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted December 4, 2018 10:55 AM

Hello,

Thank you, but that's no longer necessary; we've reproduced the issue by setting up an HPN OpenSSH instance. We're working on it and will let you know once we have more information.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted December 4, 2018 1:29 PM

Hello,

We'll be looking into this further to resolve it, but as a temporary workaround, you can unwire the Ssh.HostKey event, and set Ssh.AcceptAllHostKeys to true. (Though this will decrease security)
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted December 4, 2018 2:06 PM

We appreciate your efforts on this. We'll try the suggestion and keep an eye out for future releases. Our thanks to all involved at Dart.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted December 5, 2018 12:44 PM

Thank you for your patience. The cause of the issue is that the HPN OpenSSH initiates a 2nd Key Exchange when Ssh.StartShell() is called, but this causes us to raise the HostKey event at the same time, resulting in a deadlock between the StartShell() and the HostKey event invokation (which currently cannot be resolved at the component-level). Fortunately, the fix at the application-level is relatively easy; just call StartShell() on a worker thread instead of on the UI thread:

    ssh.Start(startShell, ssh);

    private void startShell(object state)
    {
      Ssh ssh1 = state as Ssh;
      sessionStream = ssh1.StartShell();
      model.Reader(sessionStream);
    }

This is some simplified code that resolves the issue in the Ssh Client sample, but you'll need some code to prevent a write operation before the sessionStream is set in the sample (but I assume your application is not the Ssh Client sample?).
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted December 12, 2018 9:50 AM

I am trying it now. What ThreadingModel do you recommend? We have been using
      ssh = new Ssh();
      ssh.ThreadingModel = Dart.Ssh.ThreadingModel.ApartmentBlocking;

Should we use "Free" now that we connecting on a background thread?
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted December 12, 2018 10:48 AM

Hello,

Yes. That's actually the recommended value for use under .NET:
http://dotnet.dart.com/help/ptsshnet/Dart.Ssh~Dart.Ssh.ThreadingModel.html
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted December 18, 2018 9:35 AM

I put the call to startShell in a Background thread. Still has issues.

ssh_Log(6), In: SSH_MSG_NEWKEYS 0 bytes payload.
In: 45 104 bytes payload.
2D-31-32-38-40-6F-70-65-6E-15-68-68-68-68-68-68-68-68-4A-1D-D6-F0-40-BF-AC-69-93-00-00-00-21-00-8B-2D-58-F1-D8-D9-A0-40-D2-5F-37-37-78-8E-C2-E5-C0-1A-29-70-7D-E9-94-FD-07-16-2A-69-80-D3-28-59-15-2D-31-32-38-40-6F-70-65-6E-15-68-68-68-68-68-68-68-68-4A-1D-D6-F0-40-BF-AC-69-93-00-00-00-21-00-8B-2D-58-F1-F1-F1-F1-F1

QAD.Terminal.DartSshConnection.worker_DoWork(5),
{
System.IO.IOException: Could not open channel (The connection is being shutdown)
  at clcwz.lfoub(clcwy )
  at clcwz.lfouq(Int32 )
  at Dart.Ssh.Connection.OpenSession(Int32 windowSize)
  at Dart.Ssh.Ssh.StartShell(String term, Int32 columns, Int32 rows, Int32 width, Int32 height, Byte[] modes)
  at QAD.Terminal.DartSshConnection.worker_DoWork(Object sender, DoWorkEventArgs ee) in c:\Users\rfj\Documents\netui\trunk\base\components\Terminal.test\protocols\DartSshConnection.cs:line 188
}

I am a uncertain about the comment " but you'll need some code to prevent a write operation before the sessionStream is set "

Should I do a sleep before the call to startShell? I was hoping the transition to a background thread would supply enough delay. I'm going to try a 2 second delay and see if that helps.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted December 18, 2018 11:15 AM

"uncertain about the comment..." - That would just result in a nullreference exception. This exception suggests that either the HostKey wasn't accepted again (causing the client to shutdown the connection), or that the server for some reason decided to close the connection during the open channel request. Have you checked the server logs again? They may provide more information.

I wouldn't expect a sleep before the call to startShell to resolve this, but no reason to not give that a shot.
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted December 19, 2018 5:17 PM

2 seconds of sleep got the same result. However, while the background thread was sleeping, there is a key exchange going on. I believe you are correct, something is going wrong here.
The gory details are:

While we are sleeping in the background, this appears:
In: SSH_MSG_GLOBAL_REQUEST 912 bytes payload.
50-00-00-00-17-68-6F-73-74-6B-65-79-73-2D-30-30-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-00-00-00-01-17-00-00-00-07-73-73-68-2D-72-73-61-00-00-00-03-01-00-01-00-00-01-01-00-BB-7C-EB-A2-7E-DC-D5-A9-61-7C-0E-4B-A2-61-BF-4E-BE-A7-A0-88-F8-C9-0F-16-02-96-A9-9F-E4-7A-5A-D8-46-22-07-43-6C-42-69-D0-63-02-4F-6C-3A-8A-50-F4-82-89-2E-A0-11-95-80-72-1E-AD-13-29-AA-08-7C-96-02-D3-B6-DE-CA-E6-60-72-54-A6-B5-AB-63-0E-10-26-D9-4C-CC-C7-FA-52-12-5A-E9-37-DD-BC-2E-99-98-DC-62-70-16-64-ED-36-A4-D0-D4-A4-C5-9D-EB-4C-F2-72-40-71-88-E8-DE-C8-B5-06-39-F7-D2-13-8E-3B-97-36-35-E8-07-C8-65-FA-1F-A8-48-7C-DB-C5-9B-D6-26-E7-8B-0A-FA-87-83-93-1C-3D-7D-B5-FD-ED-16-F8-D4-34-FC-D5-B2-3D-52-46-92-20-4D-07-E8-51-99-51-5B-0E-AA-E7-17-93-DC-0D-41-4F-C7-5C-FE-AD-49-EC-35-CF-0A-41-FC-87-C6-83-37-DD-71-01-99-20-A3-C6-BB-D2-BA-BC-EF-6D-95-E7-95-0E-07-00-CA-B6-B4-41-0C-5D-55-31-83-90-1B-36-53-E3-73-25-E3-B9-05-8E-28-44-E7-22-69-79-8D-C0-AE-D5-5D-38-A9-A3-66-90-29-C3-00-00-01-B2-00-00-00-07-73-73-68-2D-64-73-73-00-00-00-81-00-CA-1A-82-98-71-E9-CF-1D-FE-3D-11-25-10-C1-45-51-A1-B5-40-7A-05-B4-43-A8-FC-61-CC-2F-B9-92-54-A8-DC-62-90-40-54-BE-77-B6-0A-97-F4-9B-4F-2A-EE-E7-F9-29-5D-81-91-FF-1C-BA-E6-B9-D2-8A-AE-78-6A-0A-E6-F0-CA-6E-A5-92-CA-D2-E3-ED-57-ED-0E-69-84-84-97-DC-A3-D3-01-F7-AD-2C-B2-4D-7A-75-B3-8C-2A-47-03-EC-E3-7D-2C-A9-0C-07-F6-26-A1-67-16-C6-A2-2B-6A-FB-0F-AC-11-60-39-21-39-F6-3F-75-29-A9-91-05-00-00-00-15-00-D0-39-E4-3A-13-27-ED-4C-66-95-79-38-71-48-BB-13-B1-21-E6-29-00-00-00-81-00-A2-BD-ED-FA-89-87-67-A7-C6-85-6C-65-AE-2E-1C-B7-80-19-4B-9D-8E-58-B3-85-00-3C-4B-49-B1-3C-BA-8E-EC-15-3A-37-EE-5F-74-32-61-77-B5-1C-09-D3-B1-32-6E-8C-57-D6-F2-02-C6-46-32-EE-CC-8C-34-B6-80-FF-9E-AD-10-23-B5-58-E9-67-C1-13-64-E9-96-8B-D5-7C-EA-D7-F5-16-1D-97-69-74-65-0D-16-8C-C9-21-AF-2C-E1-4A-B1-14-E7-A4-A7-28-2F-B6-47-D3-59-F5-37-BB-51-67-FB-B4-1B-CC-D0-35-C2-CD-99-2F-A2-0D-45-C3-00-00-00-80-5C-FD-C3-78-F0-1F-B0-A1-7E-B4-A1-AE-5A-AA-F8-0A-41-22-3D-6A-F4-F9-68-77-57-DD-90-A5-67-ED-78-A8-99-B0-7B-EC-FC-9F-3D-56-C2-14-C6-EE-A1-57-CC-18-50-5A-3E-CA-51-15-88-59-50-EB-91-48-03-7A-48-6F-42-CF-2C-7F-68-3D-A2-3E-21-2A-6C-30-74-98-34-A5-90-B3-50-F6-FD-7C-A5-09-0C-A8-B5-FC-81-9C-EC-16-D2-0C-2A-73-7D-77-9D-F4-03-98-F6-30-91-C6-03-B8-AF-80-C2-E9-73-16-D8-84-59-CA-5E-10-7E-0D-A1-93-00-00-00-68-00-00-00-13-65-63-64-73-61-2D-73-68-61-32-2D-6E-69-73-74-70-32-35-36-00-00-00-08-6E-69-73-74-70-32-35-36-00-00-00-41-04-A9-A1-4A-AB-AC-21-B8-5C-F6-3C-19-65-DB-14-75-7C-79-8A-11-B8-BB-21-FE-FC-A0-FF-D7-E7-D7-56-21-56-41-D3-BA-84-8C-F3-85-3C-B9-56-D8-98-A0-97-9A-86-B3-A1-0B-19-18-24-53-58-C8-71-47-36-53-7D-4D-0B-00-00-00-33-00-00-00-0B-73-73-68-2D-65-64-32-35-35-31-39-00-00-00-20-21-75-75-EF-E0-0D-41-56-01-30-F1-16-B5-54-43-88-62-E7-82-B4-2B-D9-31-0A-58-FE-F9-8D-1F-E5-9D-19
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted December 19, 2018 5:17 PM


Then after the sleep, we call startShell (while still in the background)

Out: SSH_MSG_CHANNEL_OPEN 23 bytes payload.
5A-00-00-00-07-73-65-73-73-69-6F-6E-00-00-00-00-00-00-84-B8-00-00-84-B8
In: SSH_MSG_KEXINIT 1068 bytes payload.
14-A8-23-17-07-A3-8E-9C-9A-05-89-01-D1-4A-AA-8D-F6-00-00-01-02-63-75-72-76-65-32-35-35-31-39-2D-73-68-61-32-35-36-2C-63-75-72-76-65-32-35-35-31-39-2D-73-68-61-32-35-36-40-6C-69-62-73-73-68-2E-6F-72-67-2C-65-63-64-68-2D-73-68-61-32-2D-6E-69-73-74-70-32-35-36-2C-65-63-64-68-2D-73-68-61-32-2D-6E-69-73-74-70-33-38-34-2C-65-63-64-68-2D-73-68-61-32-2D-6E-69-73-74-70-35-32-31-2C-64-69-66-66-69-65-2D-68-65-6C-6C-6D-61-6E-2D-67-72-6F-75-70-2D-65-78-63-68-61-6E-67-65-2D-73-68-61-32-35-36-2C-64-69-66-66-69-65-2D-68-65-6C-6C-6D-61-6E-2D-67-72-6F-75-70-31-36-2D-73-68-61-35-31-32-2C-64-69-66-66-69-65-2D-68-65-6C-6C-6D-61-6E-2D-67-72-6F-75-70-31-38-2D-73-68-61-35-31-32-2C-64-69-66-66-69-65-2D-68-65-6C-6C-6D-61-6E-2D-67-72-6F-75-70-31-34-2D-73-68-61-32-35-36-2C-64-69-66-66-69-65-2D-68-65-6C-6C-6D-61-6E-2D-67-72-6F-75-70-31-34-2D-73-68-61-31-00-00-00-41-73-73-68-2D-72-73-61-2C-72-73-61-2D-73-68-61-32-2D-35-31-32-2C-72-73-61-2D-73-68-61-32-2D-32-35-36-2C-65-63-64-73-61-2D-73-68-61-32-2D-6E-69-73-74-70-32-35-36-2C-73-73-68-2D-65-64-32-35-35-31-39-00-00-00-6C-63-68-61-63-68-61-32-30-2D-70-6F-6C-79-31-33-30-35-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-61-65-73-31-32-38-2D-63-74-72-2C-61-65-73-31-39-32-2D-63-74-72-2C-61-65-73-32-35-36-2D-63-74-72-2C-61-65-73-31-32-38-2D-67-63-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-61-65-73-32-35-36-2D-67-63-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-00-00-00-6C-63-68-61-63-68-61-32-30-2D-70-6F-6C-79-31-33-30-35-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-61-65-73-31-32-38-2D-63-74-72-2C-61-65-73-31-39-32-2D-63-74-72-2C-61-65-73-32-35-36-2D-63-74-72-2C-61-65-73-31-32-38-2D-67-63-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-61-65-73-32-35-36-2D-67-63-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-00-00-00-D5-75-6D-61-63-2D-36-34-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-75-6D-61-63-2D-31-32-38-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-68-6D-61-63-2D-73-68-61-32-2D-32-35-36-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-68-6D-61-63-2D-73-68-61-32-2D-35-31-32-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-68-6D-61-63-2D-73-68-61-31-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-75-6D-61-63-2D-36-34-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-75-6D-61-63-2D-31-32-38-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-68-6D-61-63-2D-73-68-61-32-2D-32-35-36-2C-68-6D-61-63-2D-73-68-61-32-2D-35-31-32-2C-68-6D-61-63-2D-73-68-61-31-00-00-00-D5-75-6D-61-63-2D-36-34-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-75-6D-61-63-2D-31-32-38-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-68-6D-61-63-2D-73-68-61-32-2D-32-35-36-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-68-6D-61-63-2D-73-68-61-32-2D-35-31-32-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-68-6D-61-63-2D-73-68-61-31-2D-65-74-6D-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-75-6D-61-63-2D-36-34-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-75-6D-61-63-2D-31-32-38-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-2C-68-6D-61-63-2D-73-68-61-32-2D-32-35-36-2C-68-6D-61-63-2D-73-68-61-32-2D-35-31-32-2C-68-6D-61-63-2D-73-68-61-31-00-00-00-15-6E-6F-6E-65-2C-7A-6C-69-62-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-00-00-00-15-6E-6F-6E-65-2C-7A-6C-69-62-40-6F-70-65-6E-73-73-68-2E-63-6F-6D-00-00-00-00-00-00-00-00-00-00-00-00-00
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted December 19, 2018 5:18 PM

In: SSH_MSG_KEX_DH_GEX_GROUP 349 bytes payload.
1F-00-00-00-68-00-00-00-13-65-63-64-73-61-2D-73-68-61-32-2D-6E-69-73-74-70-32-35-36-00-00-00-08-6E-69-73-74-70-32-35-36-00-00-00-41-04-A9-A1-4A-AB-AC-21-B8-5C-F6-3C-19-65-DB-14-75-7C-79-8A-11-B8-BB-21-FE-FC-A0-FF-D7-E7-D7-56-21-56-41-D3-BA-84-8C-F3-85-3C-B9-56-D8-98-A0-97-9A-86-B3-A1-0B-19-18-24-53-58-C8-71-47-36-53-7D-4D-0B-00-00-00-85-04-01-75-3E-0C-0A-D5-02-CA-04-B3-30-59-B6-62-09-3A-18-18-CF-29-13-BA-9E-22-D6-54-8C-13-66-0C-7C-2E-FC-D6-A7-06-7E-B8-3F-1E-A2-60-A3-95-A7-C5-5E-B4-FD-AC-57-28-4D-EF-F9-CE-3A-B2-EC-AA-DD-E9-36-0F-6B-67-00-32-B1-E0-19-ED-F1-E2-57-8A-45-AE-4D-B1-B3-DC-73-B0-2F-24-D6-15-7A-31-D1-65-A9-35-C3-2D-AF-D6-7B-52-3F-A3-06-10-DE-C0-4C-E9-15-4D-53-EF-BD-16-9B-3D-89-A0-67-62-33-E2-3F-27-65-5B-32-12-85-F0-6D-43-00-00-00-64-00-00-00-13-65-63-64-73-61-2D-73-68-61-32-2D-6E-69-73-74-70-32-35-36-00-00-00-49-00-00-00-21-00-B8-3A-E5-7A-98-19-8E-8B-88-32-34-1B-A4-98-EF-47-A9-34-27-5E-A5-51-56-BF-E3-D5-DA-1D-DD-1B-E3-C2-00-00-00-20-5B-C4-0E-54-AA-C3-90-CB-9B-63-D1-A4-2F-7B-28-30-36-F3-10-13-0F-E2-3F-05-CD-7E-2A-B7-2F-D8-AE-79
In: SSH_MSG_NEWKEYS 0 bytes payload.
15
In: 0 92 bytes payload.
00-00-00-29-50-70-34-1B-A4-98-EF-47-A9-34-27-5E-A5-51-56-BF-E3-D5-DA-1D-DD-1B-E3-C2-00-00-00-20-5B-C4-0E-54-AA-C3-90-CB-9B-63-D1-A4-2F-7B-28-30-36-F3-10-13-0F-E2-3F-05-CD-7E-2A-B7-2F-D8-AE-79-15-00-00-00-29-50-70-34-1B-A4-98-EF-47-A9-34-27-5E-A5-51-56-BF-E3-D5-DA-1D-1D-1D-1D-1D

Then the exception.

Any clues? I do see we get several messages from the server after the "SSH_MSG_CHANNEL_OPEN" , and nothing is seems to be sent back.
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted December 19, 2018 5:24 PM

Here in house, I see a "out" message for each of the "in" messages while running in the background. I suspect something is still blocking the I/O.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted December 19, 2018 6:00 PM

Those are just standard negotiation as far as I can tell; the last packet is fully encrypted though.

Do you encounter the same exception if you implement the fix in our included SSH Client sample? In Terminal.cs, replace:

   sessionStream = ssh.StartShell();
   ssh.Start(model.Reader, sessionStream);
  }

with:

   ssh.Start(startShell, ssh);
  }

  private void startShell(object state)
  {
   Ssh ssh1 = state as Ssh;
   sessionStream = ssh1.StartShell();
   model.Reader(sessionStream);
  }

If that still throws an exception, it would be useful for us to see the server logs again to see if there's any new information to glean.
rfj

From: Santa Barbara, CA USA
Posts: 23
Member Since: 07/23/18
posted December 20, 2018 10:15 AM

Good news. Your sample code connects toi the HP machine with the code changes suggested. I had tried using a BackgroundWorker to do the same and this did not quite work. Threading can be delicate.

I will implement your suggestions in our code. Thanks for all your time, we do appreciate your support on this. You can consider this issue closed and resolved.
Reply | PowerTCP SFTP & SSH for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX