Try:
using (var ssh = new SshClient(new PasswordConnectionInfo("MyHost", "User", "Pass")))
{
ssh.Connect();
var cmd = ssh.RunCommand("FGLDIR=\"/home/genero/241/fgl\" /home/genero/241/fgl/bin/fglrun /home/genero/ssh.42r");
Console.WriteLine("Result: Stdout: {0} Stderr: {1} ({2})", cmd.Result, cmd.ExitStatus, cmd.Error);
ssh.Disconnect();
};
Why:- there is no need to have a shell script. Maintaining two sides is overkill IMHO ;)
- I suspect the problem was you don't call you shell script with a absoulte path
-
_Always check your ExitStatus and Error output







