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;