Can I do direct with the Shell channel?

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
tom_1234
Posts: 16
Joined: Fri 28 Jul 2017 19:50

Can I do direct with the Shell channel?

Post by tom_1234 » Tue 05 Sep 2017 19:20

I have seen in your demo apps how to set direct in the ScSSHServerBeforeChannelConnect(Sender: TObject; ChannelInfo: TScSSHChannelInfo; var Direct: Boolean); function so my app can then send and receive the data on that channel. (I have that working just fine)

How do I do direct with the Shellchannel as there is no direct on the connect function ScSSHServerBeforeShellConnect(Sender: TObject; ClientInfo: TScSSHClientInfo); ?


Thanks
Tom

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Can I do direct with the Shell channel?

Post by ViktorV » Fri 08 Sep 2017 08:07

When setting the Direct property to True, the TScSSHServer.BeforeChannelConnect event handler will have a direct channel for communication between the client and the server. And the data received from the client will not be transferred anywhere and these data should be processed independently.
In the case with Shell, the functionality will be identical - so we see no point in adding it.

tom_1234
Posts: 16
Joined: Fri 28 Jul 2017 19:50

Re: Can I do direct with the Shell channel?

Post by tom_1234 » Fri 08 Sep 2017 15:05

I have done some tests and do see that if the client opens a SSHShell connection the
TScSSHServer.BeforeChannelConnect event does fire and I do return Direct := true.
If my client then sends data on the ShellChannel using ScSSHShell.WriteString(); I do NOT see the
TScSSHServer.ScSSHServerDataFromClient event fire. (So I have no idea how to get the Shell data that is coming in.)

If my client opens a SSHClientChannel and I return Direct := true on the TScSSHServer.BeforeChannelConnect then I do SSHClientChannel.WriteString() then I do see the .ScSSHServerDataFromClient event fire.

So should I see the .ScSSHServerDataFromClient event fire for ShellChannel data if I return Direct := True? If yes any idea what else I should check to see what I am doing wrong to cause the event to not fire?


Thanks
Tom

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Can I do direct with the Shell channel?

Post by ViktorV » Mon 11 Sep 2017 15:43

This functionality is compatible only with TScSSHChannel and it will not work with Shell.

tom_1234
Posts: 16
Joined: Fri 28 Jul 2017 19:50

Re: Can I do direct with the Shell channel?

Post by tom_1234 » Wed 13 Sep 2017 15:41

Ok - it would have been nice to have Shell redirect but I understand you have to pick and choose what to support. ( the struggle is getting sales to understand..... :) )


Thanks
Tom

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Can I do direct with the Shell channel?

Post by ViktorV » Thu 14 Sep 2017 15:26

As we already wrote in the case of working with Shell, the functionality will be identical to working with TScSSHChannel - so we see no point in adding this functionality.

Post Reply