Hi, here is my code
```
ssh.Connect();
var cmd = ssh.CreateCommand("ls -all");
var asynch = cmd.BeginExecute(delegate(IAsyncResult ar)
{
Console.WriteLine(cmd.Result);
}, null);
var cmd1 = ssh.RunCommand("bash /etc/motor.sh"); // Perform long running task
var asynch1 = cmd1.BeginExecute(delegate(IAsyncResult ar)
{
Console.WriteLine(cmd1.Result);
}, null);
while (!(asynch.IsCompleted && asynch1.IsCompleted))
{
Console.WriteLine("Waiting for commands to complete...");
Thread.Sleep(2000);
}
cmd1.EndExecute(asynch1);
cmd.EndExecute(asynch);
ssh.Disconnect();
Console.ReadLine();
```
The problem is that command "ls -all" works well but any bash command doesn't work..
Any suggestions ?
Thank you :)
```
ssh.Connect();
var cmd = ssh.CreateCommand("ls -all");
var asynch = cmd.BeginExecute(delegate(IAsyncResult ar)
{
Console.WriteLine(cmd.Result);
}, null);
var cmd1 = ssh.RunCommand("bash /etc/motor.sh"); // Perform long running task
var asynch1 = cmd1.BeginExecute(delegate(IAsyncResult ar)
{
Console.WriteLine(cmd1.Result);
}, null);
while (!(asynch.IsCompleted && asynch1.IsCompleted))
{
Console.WriteLine("Waiting for commands to complete...");
Thread.Sleep(2000);
}
cmd1.EndExecute(asynch1);
cmd.EndExecute(asynch);
ssh.Disconnect();
Console.ReadLine();
```
The problem is that command "ls -all" works well but any bash command doesn't work..
Any suggestions ?
Thank you :)