How can I connect to a server using raw and sending string command to a server with C#

464 Views Asked by At

How can I connect to a server using a "raw" protocol and send string command to with C#? I saw this SSH method on the internet and this is exactly what I need but except I need to use the "raw" protocol like in PuTTY.

Thanks in advance.

SshClient cSSH = new SshClient("1.1.1.1", 420, "username", "password");
cSSH.Connect();
SshCommand x = cSSH.RunCommand("exec\"/var/lib/asterisk/bin/retrieve_conf\"");
cSSH.Disconnect();
cSSH.Dispose();
0

There are 0 best solutions below