Problem in SSHShell
Posted: Wed 24 Sep 2008 06:11
Hi !
Not work in Delphi 6 and Delphi 2007 with last SecureBridge.
Writelog ('Start');
ScSSHClient.Connect;
ScSSHShell.Nonblocking:=false;
ScSSHShell.Connect;
ScSSHShell.WriteString('command1'+#10#13);
Writelog(ScSSHShell.ReadString);
Writelog ('pass1');
ScSSHShell.WriteString('command2'+#10#13);
Writelog(ScSSHShell.ReadString);
Writelog ('pass2');
ScSSHShell.WriteString('command3'+#10#13);
Writelog(ScSSHShell.ReadString);
Writelog ('pass3');
In LogFile
2008-09-23 11:56:43 Start
2008-09-23 11:56:43 The prompt from a server instead of result of the command
2008-09-23 11:56:43 pass1
2008-09-23 11:56:43 Why empty ?
2008-09-23 11:56:43 pass2
2008-09-23 11:56:43 Why empty ?
2008-09-23 11:56:43 pass3
In NonBlocking-mode all works. But the result of performance of commands is deduced as follows
Writelog ('Start');
ScSSHClient.Connect;
ScSSHShell.Nonblocking:=true;
ScSSHShell.Connect;
ScSSHShell.WriteString('command1'+#10#13);
Writelog ('pass1');
ScSSHShell.WriteString('command2'+#10#13);
Writelog ('pass2');
ScSSHShell.WriteString('command3'+#10#13);
Writelog ('pass3');
ScSSHShellOnAsyncReceive Writelog(ScSSHShell.ReadString);
In LogFile
2008-09-23 11:56:43 Start
2008-09-23 11:56:43 pass1
2008-09-23 11:56:43 pass2
2008-09-23 11:56:43 pass3
2008-09-23 11:56:43 result of performance of commands
It is necessary for me to see result of performance of each command, instead of the common result of performance of all commands
Not work in Delphi 6 and Delphi 2007 with last SecureBridge.
Writelog ('Start');
ScSSHClient.Connect;
ScSSHShell.Nonblocking:=false;
ScSSHShell.Connect;
ScSSHShell.WriteString('command1'+#10#13);
Writelog(ScSSHShell.ReadString);
Writelog ('pass1');
ScSSHShell.WriteString('command2'+#10#13);
Writelog(ScSSHShell.ReadString);
Writelog ('pass2');
ScSSHShell.WriteString('command3'+#10#13);
Writelog(ScSSHShell.ReadString);
Writelog ('pass3');
In LogFile
2008-09-23 11:56:43 Start
2008-09-23 11:56:43 The prompt from a server instead of result of the command
2008-09-23 11:56:43 pass1
2008-09-23 11:56:43 Why empty ?
2008-09-23 11:56:43 pass2
2008-09-23 11:56:43 Why empty ?
2008-09-23 11:56:43 pass3
In NonBlocking-mode all works. But the result of performance of commands is deduced as follows
Writelog ('Start');
ScSSHClient.Connect;
ScSSHShell.Nonblocking:=true;
ScSSHShell.Connect;
ScSSHShell.WriteString('command1'+#10#13);
Writelog ('pass1');
ScSSHShell.WriteString('command2'+#10#13);
Writelog ('pass2');
ScSSHShell.WriteString('command3'+#10#13);
Writelog ('pass3');
ScSSHShellOnAsyncReceive Writelog(ScSSHShell.ReadString);
In LogFile
2008-09-23 11:56:43 Start
2008-09-23 11:56:43 pass1
2008-09-23 11:56:43 pass2
2008-09-23 11:56:43 pass3
2008-09-23 11:56:43 result of performance of commands
It is necessary for me to see result of performance of each command, instead of the common result of performance of all commands