+1 vote
by (180 points)

For one of our customers we need to send additional data when establishing the conneciton.

Using PuTTY we can dothis by using the Environment Variables

image Data -> Environment Variables in PuTTY">

We have found no way to put this into the Rebex.Net.Telnet object or in Rebex.Net.TelnetSettings.

Can you please help us to add this information in the connection information?

1 Answer

0 votes
by (72.7k points)

Unfortunately, this feature is currently not supported. However, we are planning to add it in a future version.

In the meantime, use shell command to set environment variables after logging in (if possible). You can use export on Unix or set on Windows.

If you want to receive beta version of this functionality, leave a comment here.

by (180 points)
Thank you for your answer

When we connect to the remote server we are not presented with a prompt, but a text-mode software directly instead.

How can we try to send shell command to the server? Could we use 'TerminalOptions.RemoteCommand' with the 'export DEVNAME RF2287001P' value?

Please if you could give us a beta version would be really helpful for us

Thank you
by (72.7k points)
Oh, if your session starts directly at a software (not standard shell with prompt) then you are probably not able to set environment variables (I suppose there is no way to switch to a command prompt and issue custom commands).

'TerminalOptions.RemoteCommand' is not helpful here.
1. It is available for SSH connections only.
2. It executes a single command on a separate SSH channel, further consecutive shells are not affected by this command, because each shell uses its own SSH channel.

I will send you link to beta version via email today.
by (180 points)
Hi! I just wanted to ask if any of the recent stable releases include this feature, so we can move to stable nuget packages. Thank you!
by (72.7k points)
The feature is already implemented and it will be released in R7.0 version.
If you want to receive current R7.0 beta version, please let us know.
by (180 points)
Hi Lukas, Please if you could send us this beta version, would be appreciated (targeting net472 and netstandard20)
by (72.7k points)
I have sent you download links to your email.
by (180 points)
Received! Thank you so much. We'll let you know if we face any problem upgrading to this release.
...