Timeout occurred due to inactivity when I execute - WeOnlyDo Discussion board

Timeout occurred due to inactivity when I execute (wodSSH / wodSSH.NET)

by sajjad, Tuesday, March 17, 2009, 07:55 (5518 days ago)

Hi,

I'm having difficulty to execute a command. To execute I got exception Timeout occurred due to inactivity. at WAITFOR. I want to execute a .sh file which is replaced on linux. So I am unable to execute .sh file. If anyone know please reply. Following is my code:

////************** CODE ********************////
private void button3_Click(object sender, EventArgs e)
{
Ssh1.Login = TextBox3.Text;
Ssh1.Password = TextBox4.Text;
Ssh1.Encryption = WeOnlyDo.Client.SSH.EncryptionMethods.Auto;
Ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSHAuto;
Ssh1.Port = 22;
Ssh1.Blocking = true;
Ssh1.Timeout = 40;
Ssh1.Hostname = cat.com ;
Ssh1.TerminalType = tty ;
Ssh1.Connect(TextBox2.Text);
}


private void Ssh1_Connected(object sender, WeOnlyDo.Client.SSH.ConnectedArgs e)
{
Ssh1.WaitFor( root@cat.com ); // I GOT EXCEPTION HERE
Ssh1.Prompt = root@cat.com ; // I GOT EXCEPTION HERE
Ssh1.Execute( /var/argole/backups
);
Ssh1.Execute( ./backup.sh
); // backup.sh is a file on linux
}

//// ******************************************************* /////


Complete thread: