0

I have made an application, which connects to the device using SSH connection as we do using PUTTY software. In my application I have used Tamir.sharpSsh C# library.It gives an exception at making SSH connection. I don't know that either it is a problem of library or device response or something else.

Below is the code.

using Tamir.SharpSsh;

                        var obj = new SshStream(ip, username, password); // exception here
                        obj.Write("ls -a");
                        string rS = obj.ReadResponse();
                        richTextBox.Text = rS;

Here is the Exception

Exception : System.IO.IOException
   at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
   at Tamir.SharpSsh.jsch.Session.connect()
   at Tamir.SharpSsh.SshStream..ctor(String host, String username, String password)

I can also provide the Wireshark data if needed.

Azeem Akram
  • 223
  • 6
  • 9
  • 21

1 Answers1

0

Tamir.SSH is broken and doesn't work. The only open source SSH library for .Net currently is SSH.Det. You can find it at this link: http://sshnet.codeplex.com/ Have a look at this SO question: Are there any good free .Net network libraries? (FTP, SFTP, SSH, etc.)

Community
  • 1
  • 1
Zoran Pavlovic
  • 1,166
  • 2
  • 23
  • 38
  • This link is going to a redirect page, and that library requires special build tools making it much less useless. – Mark Sep 27 '17 at 03:01