Replies: 10 comments
-
You are opening issues twice for the same thing, don’t don that. You need to create an event handler and pass the correct connect info for keyboard interactive https://github.com/darkoperator/Posh-SSH/blob/7f6da8029338ffc972a1348a894fefc2c0c9d15b/Source/PoshSSH/PoshSSH/NewSessionBase.cs#L211 you can pass more than one connectioninfo type
|
Beta Was this translation helpful? Give feedback.
-
Not sure I follow. Why does Connect() work for RHEL, Fedora, Debian, Ubuntu, and SUSE but not for FreeBSD? |
Beta Was this translation helpful? Give feedback.
-
Because those in sshd configuration file are PreferredAuthentications=passwordand and FreeBSD has it PreferredAuthentications=keyboard-interactive
|
Beta Was this translation helpful? Give feedback.
-
It makes this library unworkable because we do not always know which OS, distro, or version we connect to. We have no way of knowing what are server settings. All of this has to be supported by the library, OOB because it may be THE ONLY WAY to connect to the box. If it depends on the box settings then this library has a very limited usability. Bottom line, this has to be the default behavior that it connects to anything and everything, like PuTTY does. PuTTY is your golden standard, and this library has to match it, if its developer has a hope of adoption. |
Beta Was this translation helpful? Give feedback.
-
You can specify multiple connection infos and let it choose which one to use. It takes an array
|
Beta Was this translation helpful? Give feedback.
-
So you can specify password, multiple keyboard interactive for different prompts handled as events and even keys. As the server requests from one type to then other it changes to the correct one if you specified a connection info for the type. For my PS module I only use one but for version 4.x I will add multiple so it works when OTP is set or combo of key and password is used at some point
|
Beta Was this translation helpful? Give feedback.
-
Interesting, but I do not understand anything that you write. I do not know what PS or OTP is, and what connection infos are. When one connects to SSH they know the IP, user name, and password or key. They do not need to know anything else, like in the case of PuTTY. I glanced at your link. I have no faintest idea what your code does because SshClient does not expose any of methods/properties that you use. ConnectionInfo is an R/O property. What are you alluding to when you write that I have to create an event handler? For which event of SshClient? Are we referring to the same Nuget package SSH.NET or to different packages? |
Beta Was this translation helpful? Give feedback.
-
You are confusing an app with a library that you code against. In the library you need to manage all those parameters in your code. The link I sent you is C# code you could read and understand more how to use the library.
|
Beta Was this translation helpful? Give feedback.
-
You've sent me something coded against an API that I do not find in SSH.NET. |
Beta Was this translation helpful? Give feedback.
-
Ah,I see! The event you had cursorily mentioned is not on SshClient. It is This is not the most elegant solution because it increases the surface of SSH.NET at the consuming application. If we compare all of the above with WinScp that only needs a host address, a user name, and a password, then this is your golden standard if PuTTY is not good enough for you. |
Beta Was this translation helpful? Give feedback.
-
Getting exception:
"No suitable authentication method found to complete authentication (publickey,keyboard-interactive)."
The same host through PuTTY, with the same credentials:
Beta Was this translation helpful? Give feedback.
All reactions