I want to use SSH.net library (https://github.com/sshnet/SSH.NET ) to execute commands on a linux box over SSH.
Here is a sample code:
SshClient cSSH = new SshClient("13.93.231.87", 22, "user", "pass");
cSSH.Connect();
var cmd = "screen -S screenName";
SshCommand x = cSSH.RunCommand(cmd);
I see x.Result, it contains following:
x.Result = "Must be connected to a terminal.\r\n"
What does it mean? Is it not possible to use "screen" commands via Ssh.NET? Or is there another way to achieve it?
What i want to achieve is having a C# console application which executes commands on a linux box under a screen. And then I should be able to connect the same screen again and execute commands and detach screen. And continue doing that.