Page 1 of 1

It's possible to send commands?

Posted: Tue 11 Sep 2007 15:54
Hello!
I have a question about SecureBridge?
It's possible to build an application like Putty?
I have to send commands to the server.
(For example for UNIX: "CD","LS"...)
Wenn i am trying to send a command, i get this error: "Protocol mismatch"
What ist wrong?

Thanks a lot!
Eugen
------------------------------------------------
Sample:
var
ResultStr: String;

procedure TForm1.ButtonCommandClick(Sender: TObject);
var
b: PChar;
i: integer;
begin
b:= StrAlloc(1024);
b:= 'LS' + #10#0;
ResultStr := '';

ScSSHClient1.Connect;
ScSSHChannel1.Connect;

i:= ScSSHChannel1.WriteBuffer(b^, length(b));
showmessage(IntToStr(i ));
end;

procedure TForm1.ScSSHChannel1AsyncReceive(Sender: TObject);
var
b: PChar;
i: integer;
begin
b:= StrAlloc(1024);
i:= ScSSHChannel1.ReadBuffer(b^, ScSSHChannel1.InCount);
ResultStr := String(b);
StrDispose(b);
showmessage(ResultStr);
end;

Posted: Wed 12 Sep 2007 09:37
by Dimon
Now SecureBridge does not support such functionality. We will add it in the next version of SecureBridge. It will be available in beta very soon.