1

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();
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Offset
  • 53
  • 1
  • 8
  • What do you mean with "raw". Without any protocol: [TcpClient](https://msdn.microsoft.com/en-US/library/system.net.sockets.tcpclient(v=vs.110).aspx). SSH:e.g. [SSH.NET](https://github.com/sshnet/SSH.NET) or [SharpSSH](https://sourceforge.net/projects/sharpssh/) – H.G. Sandhagen Dec 22 '16 at 18:00
  • This might be helpful. Not sure if it's what the OP is talking about, though. [What is Putty's "raw" TCP connection?](http://forum.codecall.net/topic/66411-puttys-raw-tcp-connection/) –  Dec 22 '16 at 18:06
  • example if you open putty you will see the connection type there is option called raw. thats what I need for C# – Offset Dec 22 '16 at 18:06

0 Answers0