Eliminating password prompts from ssh & scp

leam leam at reuel.net
Wed Dec 10 21:23:37 UTC 2003


Allan Metts wrote:
> Hi all,
> 
> I have a silly little problem that has cost me an inordinate amount of 
> time.
> 
> I need to spawn a secure file transfer from within a C program.  I'd 
> like to simply execute the appropriate scp statement and capture the 
> return code -- should be no problem.
> 
> Here's the silly part:  I can't find a way to prevent scp from prompting 
> me for a password.  I've messed with sshd_config, established RSA1 keys, 
> and done everything else I can think of.  And there seems to be no way 
> to include the password on the scp command line.  I really don't want to 
> have to set up chat or expect logic just to deal with the password prompt.
> 
> I've got to be overlooking something basic, but I'll be darned if I can 
> figure out what.  Can someone set me straight?  If not, does anyone know 
> of an easy-to-use C++ API wrapper for scp/sftp?
> 
> Thanks in advance,
> Allan

Copy the ~/.ssh/id_dsa.pub into the target ~/.ssh/authorized_keys

ciao!

leam





More information about the users mailing list