Hello, i have new problem using DetectPrompt() method.
I modified the file /home/username/.bashrc on my linux system.
I added next strings:
sleep 10 seconds
sleep 10
print some text after standard welcome message, for example:
Last login: Mon Sep 29 10:54:19 2014 from 192.168.0.21
test
echo "test"
Case 1:
var ssh = new Ssh();
ssh.Timeout = 200000; //200 seconds
ssh.Connect(servername);
ssh.Login(username, password);
Scripting scripting = ssh.StartScripting();
//scripting.Timeout have default value: 60000
scripting.DetectPrompt();
The ssh timeout value > the scripting timeout value > the script sleep value. I got:
Rebex.TerminalEmulationException: Unable to detect prompt
in Rebex.TerminalEmulation.Scripting.KC()
in Rebex.TerminalEmulation.Scripting.DetectPrompt()
Case 2 (script sleep value modified to 3 seconds):
var ssh = new Ssh();
ssh.Timeout = 1000; //1 second
ssh.Connect(servername);
ssh.Login(username, password);
Scripting scripting = ssh.StartScripting();
scripting.Timeout = 1000
scripting.DetectPrompt(); // WORKS !!!
Is it correct?