Re: Make SFTP use identity file instead of password?
Roger <[email protected]> Fri, 14 Jan 2011 03:48:34 -0900
| Newsgroups | gmane.comp.web.sitecopy |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jan 14, 2011 at 01:49:37AM -0900, Roger wrote:
>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
>
>
>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--
I got a little further by using double quotes:
---snip---
site blah
server oh.somewhere.over.the.hill.org
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
I kept getting a "No such file". I don't know if it's relevant but it does
occur at approximately the place sftp starts:
---snip---
File: local=about/beanyweeny.html stored=., new
Time: 1114586764/0 Size: 0/0ASCII:n/n Perms:644/000
Reading info file: /home/stud/.sitecopy/mysite
sitecopy: Updating site `mysite' (on somewhere.overthehill.org in /my/remote/folder/)
Creating about/: SFTP: 'mkdir /my/remote/folder/about'
sftp exec: scp -i /home/joeblow/.ssh/id_you_wishy_washy [email protected]: No such file or directory
SFTP: 'mkdir /my/remote/folder/joeblow/about'
SFTP: 'mkdir /my/remote/folder/joeblow/files'
---snip---
Even after creating the (wonderful) netrc and/or ~/.sitecopy/p* files,
still seeing this error.
One thing I want to make note here, sitecopy should make a backup of the
$HOME/.sitecopy/site hash file. It's always getting corrupt!
My main issue was being able to issue non-interactive sitecopy updates and
since I have a low bandwidth here, encryption isn't really desired. However,
if I can get it working, it would be great.