© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
6 replies
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();
        }
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".
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ .NET not Working
C#CC# / help
11mo ago
✅ .NET sdk not working
C#CC# / help
2y ago
SSH.NET hide terminal junk
C#CC# / help
2y ago
[.NET 6] Fault contract not working
C#CC# / help
5mo ago