Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello all

I've got a very easy question for you guys, but quite difficult for me i guess

How can my MonoDevelop C# GUI deliver commands (by pressing a button on it) to a putty window and read from it as well, communicating with a distanced linux server?

(in other words i want to read and deliver commands to the terminal over ssh connection)

it has something to do with "using System.Diagnostics;" , or command-line argument parser maybe, but im unable to figure out how exactly. Ive spent the whole day without any fine results

can somebody please write a small code example? thx a lot
Posted

You can use SendKeys from your application to send keystrokes to the putty window. See this link for the signature of the method.



 
Share this answer
 
Comments
CPallini 24-Apr-11 5:00am    
I think you missed the 'communicating with a distanced linux server' part.
Patrick Kalkman 24-Apr-11 5:15am    
I did not miss it. I thought that communicating with the putty client from his c# application was the easiest solutions. That is what I suggested, use sendkeys to send keystrokes to the putty client window.

I may not be the most elegant solutions but but it works.
You may have a look at the CodeProject's article: SSL/TLS client/server for .NET and SSL tunnelling[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900