0

this is the code i'm using

SshClient cSSH = new SshClient("192.168.10.144", 22, "root", "pacaritambo");
cSSH.Connect();
SshCommand x = cSSH.RunCommand("exec \"/var/lib/asterisk/bin/retrieve_conf\"");
cSSH.Disconnect();
cSSH.Dispose();

but i want to send command from a textbox so I've tried this

SshCommand x = cSSH.RunCommand(textbox3.Text);

but didn't work basically i want textbox3.Text as a ssh command.

1 Answer 1

1

Use:

SshCommand x = cSSH.RunCommand(textbox3.Text);

Without quotes.

Sign up to request clarification or add additional context in comments.

3 Comments

@AytuğHan Then you should include the exception in your question.
Problem fix thanks and how can i send ctrl + c to my ssh client
@AytuğHan That's another question, open a new one

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.