C#
C#

help

Root Question Message

Theos
Theos12/21/2022
❔ 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".
Theos
Theos12/21/2022
okay now i tried screen -r 23057 and it printed "Must be connected to a terminal."
Theos
Theos12/21/2022
so _IP is a string and it is correct for sure
Theos
Theos12/21/2022
_USER is just "root"
Theos
Theos12/21/2022
and _PASSWORD is a password for my root account
Theos
Theos12/21/2022
i've verified these
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy