SSH.NET - Setting Protocol to Auto resets custom S - WeOnlyDo Discussion board

SSH.NET - Setting Protocol to Auto resets custom S (wodSSH / wodSSH.NET)

by r_honey, Sunday, January 22, 2012, 19:57 (4449 days ago)

I am evaluating SSH.NET for use in one of my apps and I hit a bug. While connecting to a SSH server, I assigned properties in this order:

Host
Port
Protocol -> SSHSuto
Username
Password
//More properties

And I noticed that my port was being overridden with 22 after I assigned protocol to Auto. I had to move Protocol assignment before Port assignment to make it work.

Re: SSH.NET - Setting Protocol to Auto resets cust

by wodDamir, Sunday, January 22, 2012, 20:00 (4449 days ago) @ r_honey

Hi Rahul,

Actually, it's not a bug. When protocol is set, the Port is set to the assigned protocol's default port (i.e. 22 for SSH, 23 for Telnet).

That's why Port should be set after assigning Protocol property.

Regards,
Damba