Discuss this help topic in SecureBlackbox Forum
Use command channel to send one command with TElSimpleSSHClient
TElSimpleSSHClient works in three different modes (shell, command and subsystem), with the shell being the default. While the difference between shell and command modes might sometimes be non-obvious, in fact it is quite immense. Shell and command run via channels of different types; often remote operating systems use different approaches for launching shell and commands so they may actually be executed with different access rights profiles.
To run the connection in command mode you have to assign the command to the Command property before opening the connection:
C#:
client.Command = "ls -l";
If the Command property is assigned, the class will set up the command channel instead of the shell one. The rest of the communication is no different to the shell mode at all, and you can use the same approach to interact with remote program to exchange the data.