Re: Make SFTP use identity file instead of password?

Roger <[email protected]> Fri, 14 Jan 2011 01:49:37 -0900
Newsgroups gmane.comp.web.sitecopy
Message-ID <[email protected]>
On Fri, Jan 14, 2011 at 09:22:49AM +0000, Joe Orton wrote:
>On Thu, Jan 13, 2011 at 11:58:11PM -0900, Roger wrote:
>> Just curious, anybody interested in getting Sitecopy to use an identity file
>> instead of password when using SFTP/SCP?  (aka -i switch to ssh/scp/sftp)
>
>Hi, you should be able to customise these already, though it doesn't 
>seem to be mentioned in the man page - use the "rcp" and "rsh" keywords 
>work to specify an alternate sftp/scp command-line, i.e:
>
>site foo
>   protocol sftp
>   rsh ssh -i bar
>   rcp scp -i bar
>   ...
>
>if this doesn't work please let me know.

I tried both, then either one on the 0.16.6 version and no go.

~/src/sitecopy/sitecopy-0.16.6 $ ./sitecopy -u sdf -dftp
sitecopy: rcfile corrupt at line 15:
    rsh ssh -i /home/roger/.ssh/id_rsa_sdf.lonestar.org

~/src/sitecopy/sitecopy-0.16.6 $ ./sitecopy -u sdf -dftp
sitecopy: rcfile corrupt at line 16:
    rcp scp -i /home/roger/.ssh/id_rsa_sdf.lonestar.org 


I had issues trying to grab CVS/SVN.

File $HOME/.sitecopyrc:
---snip---
site blah
    server oh.somewhere.over.the.hill.org
    #protocol ftp
    protocol sftp
    #rsh ssh -i /home/joeblow/.ssh/id_you_wishy_washy
    rcp scp -i /home/joeblow/.ssh/id_you_wishy_washy
    username joeblow
    local /my/folder/
    remote /my/remote/folder/
    permissions all
---snip--

(Even then, I was just thinking it might be easy to integrate using strcat/strncat.)

-- 
Roger
http://rogerx.freeshell.org/