C#C
C#3y ago
Theos

❔ SSH.Net commands not working

using (var client = new SshClient(_IP, _USER, _PASSWORD))
        {
            client.Connect();

            using (var command = client.CreateCommand("ls && history"))
            {
                Console.Write(command.Execute());
            }

            client.Disconnect();
        }

And when I run it it prints "snap". When I connect to my machine with putty and i run history after it I don't see "ls" nor "history".
Was this page helpful?