So I am in the process of writing simple client type program that send files over ssh. My goal is to have a shell script that interacts. for an example if i wanted to send a file to the server it wound be something like 'foo send FILENAME'. My question where do I need to start looking or what would be my first step in implementing this. I am not looking for an answer but more of a gentle nudge in the right direction.

Recommended Answers

All 2 Replies

You can construct the ssh string in your code (e.g. "scp file server") and then run it using the system() command. Did I understand your question correctly?


I see what you mean. Basically use the program to start and stop and run the process? Now would this be the most efficient way to do this?? Also, how would i be able to communicate with the process while it is running in the background? I guess I could just go RTFM it hahaha

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.