EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ssh command / multi sessions

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
Posted: 01/17/2008 09:00:07
by Phil Hoster (Standard support level)
Joined: 01/16/2008
Posts: 1

I have built a small ssh shell terminal using the simpleclient as an example. Everything is working fine. I am using receivetext, sendtext and senddata. Now I would like to use something like the features described in the command and commands properties for a second session to the same ssh server within the same form what is the best approach to do it? The issue is that I need to be able to push some commands via a button (instead of using the terminal) to the same server and handle the response without impacting the main console terminal. How can I do this in one single form? Do you have an example available? Also is there an example showing the canreceive feature? I am using vb .net 5.123
Thank you.

Posted: 01/17/2008 09:20:20
by Ken Ivanov (EldoS Corp.)

ElSimpleSSHClient is too "simple" for such task. It works in one of two modes, shell mode (if no commands are specified) and command mode (if Commands contains at least one command). Please use ElSSHClient instead. In general words, you should:
1. Create and set up ElSSHClient object,
2. Create and set up ElShellSSHTunnel, ElCommandSSHTunnel and ElSSHTunnelList objects,
3. Bind ElSSHTunnelList to ElSSHClient, bind ElShellSSHTunnel and ElCommandSSHTunnel to ElSSHTunnelList,
4. Call ElSSHClient.Open method to initiate the connection.

Tunnel objects (like ElCommandSSHTunnel and ElShellSSHTunnel) can also be set up and opened at runtime (it is not necessary to set up them *before* connecting to server).
Posted: 01/17/2008 09:24:52
by Ken Ivanov (EldoS Corp.)

Do you have an example available?

There's no example for implementing such task, sorry. Please use SSHDemo, it illustrates the use of ElShellSSHTunnel. You can easily extend it by adding an ElCommandSSHTunnel object to the form.

Also is there an example showing the canreceive feature?

It is very easy to use -- just pass the desired timeout value as a parameter to make it wait for incoming data for the specified number of milliseconds. It will return true if some data are available and can be read using Receive* call, or false if there's no incoming data from server.



Topic viewed 1399 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!