Hello everyone,
I’m currently enhancing the Linux Platform connector, which already supports SSH authentication via username and password. The existing implementation uses the options tag within the parameter type, as shown below:
<Param id="502" trending="false" save="true">
<Name>sshUsername</Name>
<Description>SSH Username</Description>
<Information>
<Subtext>The SSH username to login.</Subtext>
</Information>
<Type options="SSH Username">read</Type>
...
</Param>
<Param id="503" trending="false" save="true">
<Name>sshPassword</Name>
<Description>SSH Password</Description>
<Type options="SSH PWD">read</Type>
<Information>
<Subtext>The SSH password to login.</Subtext>
</Information>
...
</Param>
I need to extend this functionality to also support shared key authentication, allowing users to toggle between the two methods (e.g., via a toggle button parameter).
From the options attribute | DataMiner Docs, I found references to the ssh options tag, which seems like a potential solution. However, I have a few questions:
-
Coexistence of Methods: Is it possible to support both authentication methods in the same connector, using both option tags ("SSH PWD"/"SSH Username" and "SSH OPTIONS")?
-
If possible, how?:
- How would the protocol determine which authentication method to use?
- Would retaining the options="SSH Username" and options="SSH pwd" attributes work alongside shared key authentication using options="SSH PWD" attribute, or would manual connection handling (opening/closing the connection before SSH commands) be necessary?
Hi,
All items are always set on the connection. I.e. when there is a user name and password attribute available, but no options, then the options will be used as empty anyhow.
In other words, the user can decide which one to use just by leaving the parameter value empty when not needed. So actually there is no togglebutton needed, simply leave the item empty if it does not need to be used.
If for some reason they want to keep all the settings and toggle between both then first create an SSH user name, password, option as normal single parameters (without the attribute specified). In the background the actual parameters with the attribute also exists and then based on the togglebutton either the user name and password values are copied to the actual parameters and options is set to an empty value, or vice versa. Do note that every set of a parameter value is considered separate, so setting user name will try to SSH connect with that user name and the values at that time that are present in password and options.
Regards,

Thank you Laurens