I am currently making a File-Dialog-like form in C# that browses directories on a unix server. I have a bit of a trouble getting the 'cd ..' command to work.
Here is an example of my code
var sshExec = new SshExec("192.x.x.x", "user", "pass");
sshExec.Connect();
var err = string.Empty;
var out = string.Empty;
sshExec.RunCommand("pwd", ref out, ref err);
Console.Writeline(out);
sshExec.RunCommand("cd ..");
sshExec.RunCommand("pwd", ref out, ref err);
Console.Writeline(out);
I've tried other formats such as cd ..
or $"cd .." and yet I seem to remain in the same
directory.
I guess every time I use RunCommand() sshExec creates a new transaction therefore I stay
in the same directory.
Anyone knows how can I make this work?