AimeeSoltys
Programmer
I am trying to write a C program that uses SCP to obtain a file from another machine to the current machine. Does anyone have suggestions on how to code this? This is what I have:
char CommandLine[4096];
...
sprintf( CommandLine, "scp user@OtherMachine:/../../file.gz ." );
system( CommandLine );
But of course, SCP is gonna ask for a password, so how do I have the C program give the password?
user@OtherMachine's password:
char CommandLine[4096];
...
sprintf( CommandLine, "scp user@OtherMachine:/../../file.gz ." );
system( CommandLine );
But of course, SCP is gonna ask for a password, so how do I have the C program give the password?
user@OtherMachine's password: