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
Can I do direct with the Shell channel?
Re: Can I do direct with the Shell channel?
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.
In the case with Shell, the functionality will be identical - so we see no point in adding it.
Re: Can I do direct with the Shell channel?
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
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
Re: Can I do direct with the Shell channel?
This functionality is compatible only with TScSSHChannel and it will not work with Shell.
Re: Can I do direct with the Shell channel?
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
Thanks
Tom
Re: Can I do direct with the Shell channel?
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.