• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: rsync do shell script password..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rsync do shell script password..


  • Subject: Re: rsync do shell script password..
  • From: Wayne Melrose <email@hidden>
  • Date: Fri, 14 Sep 2007 05:55:31 +0200


On 13/09/2007, at 11:18 PM, Christopher Nebel wrote:

On Sep 12, 2007, at 12:06 PM, Wayne Melrose wrote:

I'm going a little mad here, and running in circles.. 

I've got a few files that I'd like to sync to a remote server. I've set up a command that looks like this 

do shell script "rsync -Ezpu  /Users/me/Desktop/rsync.scpt  serverUser@10.0.0.1:/Users/server/Desktop/"

Which works fine as a shell script, prompting for the password.. Trick is I'd like to send the command with the password.. 

I've figured out three things.. 

1.
I can use a variable RSYNC_PASSWORD=mypassword

If that's true, then this should work:

do shell script "RSYNC_PASSWORD=mypassword rsync -Ezpu ..."

There you are ! :)

I tried exactly that syntax, still errored, I think that the dictionary says something about this only working if you are using an rsync server.. but I thought this should have worked.. maybe I should try again ...


It's a rather handy feature of sh; you can set up extra environment variables for a single command.

2. 
Store the password in a file, then use the command --password-file=/path/to/password/file

do shell script "echo mypassword > /path/to/password/file"

I did not try echo-ing the password, I'll have a crack at this and report back if it works 

do shell script "rsync --password-file=/path/to/password/file -Ezpu ..."

Also tired this with no luck.. 

3.
Use ssh-keygen to store the passwords..? Not really what I want. 

No clue, but you said you don't want it anyway. =)



--Chris Nebel
AppleScript Engineering


Thanks .. 

Wayne Melrose
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: rsync do shell script password..
      • From: "Mark J. Reed" <email@hidden>
References: 
 >rsync do shell script password.. (From: Wayne Melrose <email@hidden>)
 >Re: rsync do shell script password.. (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Taking iChat offline
  • Next by Date: Re: A Different Rsync Question
  • Previous by thread: Re: rsync do shell script password..
  • Next by thread: Re: rsync do shell script password..
  • Index(es):
    • Date
    • Thread