C
C#

help

❔ SSH.Net commands not working

TTheos12/21/2022
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". okay now i tried screen -r 23057 and it printed "Must be connected to a terminal." so _IP is a string and it is correct for sure _USER is just "root" and _PASSWORD is a password for my root account i've verified these
AAccord12/22/2022
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
❔ GeneratedRegex throws System.OverflowExceptionHey guys. I've (definitely) found a bug with the `GeneratedRegexAttribute` and the code generated co❔ How To Use Saved String Data As ButtonLabel ContentHi I'm fairly new to C#/XAML, however not necessarily new to coding in general (using Visual Studio✅ How I remove the final thing from the run app?When My app end this show up, I want to stop this to show✅ How i put icon and title to app?Here is my console app and I want to put an icon and there to be an text not the location of the fil✅ Best way to save or normalize phonenumberI want to save a phonenumber into my DB. But user use sometimes other notations... How do I normlali❔ HTTP Error 413.1 - Request Entity Too LargeI have project on .net 5 in visual studio 2022. Does anyone can help me to fix it?❔ Trying to use SyncFusion with Blazor.Hi, i've installed the blazor components from the website and through the nuget manager on Visual St✅ Check if port is upHey all, I have a process which is running a server on a certain port `_port` *locally*, the clients❔ How to connect to Azure Key Vault from external VPS?Instructions for Azure VM was two lines of "Azure code" I'm now using a VM from a third party, is i❔ Azure VM network very slowIs this normal? Is it because I'm on east coast and server is in Switzerland?❔ Exists a node in priority queue or not (O(1)) with value type nodesIn reference types, it is OK. There is an array of a struct type(Element) and I would like to swap s❔ Dictionary of delegates for non-static functions. (Task & Action)I'm trying to write a dictionary for delegates that when specific values are passed so I can invoke ❔ Please Recommend Command Processing PackageI'm looking to add command processing in my application (WPF). Is there a recommended package? I'v❔ I need help with logicHey, i want to create a little algorithm that is able to calculate - via multiple criteria - the ch