write ssh client

hi, i want to write c++ program,
GOAL : " when a person press a button on windows OS my linux OS shutdown on the other side"
i know how to use socket but i don't know anything about ssh protocol and i don't know how to use it in my program source code.
You don't need a C++ program to do that. You just need to execute "sudo halt -p". That's no big deal.
thanks for your answer but i must write this c++ program its my assignment, i must write it on c++ language. please help me how can i use ssh protocol.
Here is something about ssh that might be useful to you..
http://nextstep4it.com/magazines/nseditions/2012/Sep12_Edition/linux.html
thanks hitesh i read this document but they are ssh commands not ssh transfer protocol... you know! when somebody use putty on windows and the other side someone use ssh on linux to connect with each other, this connection have a common language i think this language is ssh porotocol therefor i must have this protocol source code or pattern to write this ssh client program.
Usually people just use a library for something like this, like OpenSSH.
how can I use of this library (openSSH) in my code? i dont know anything about this library and its functions.please explain more.
Have you ever used a library before? It's just the same as others. Link it however you wish, then read the documentation to see what functions you'll need to be using.
Topic archived. No new replies allowed.