I would like to be able to receive and send commands as XML strings via SSH. But I receive only "<?xml" instead of the whole XML string.
Why XML: because my client is an application.
My server init:
_secureServer = new FileServer();
_secureServer.Bind(2222, FileServerProtocol.Shell);
_secureServer.Bind(2222, FileServerProtocol.Sftp);
...
_secureServer.ShellCommand += server_ShellCommand;
_secureServer.Start();
Receive function:
void server_ShellCommand(object sender, ShellCommandEventArgs e)
{
if (e.Command.Equals("sh"))
return;
string command = e.Command;
}
I'm sending a normal XML string beginning with
<?xml version="1.0" encoding="utf-16"?>
<ShellCommandBase xmlns:xsi="http://www.w3.org/2001/XMLSchema-.....
Before sending it to the server I remove all new lines.
Makes no sense why it ends after a space??