954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

integrating ssh

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.

n30h4x
Newbie Poster
15 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

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?

Dave

daviddoria
Posting Virtuoso
1,996 posts since Feb 2008
Reputation Points: 437
Solved Threads: 204
 

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

n30h4x
Newbie Poster
15 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: