Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Sync to a remote machine without using the CLI' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Sync to a remote machine without using the CLI
Authored by: rbenezra on Mar 23, '06 09:04:15AM

The automation would involve 3 steps:

1. launching the tunnel 2. mounting the volume 3. syncing

Since SSH Tunnel manager is scriptable, this should be possible but I haven't figured out the syntax...anyone?

2. This script will mount the volume if you are remote and tunneled (as you wanted) ; you need to add your own username and password and computer name where indicated; also save as run only script so the password can't be lifted:

try
set the disk_URL to "afp://" & "username" & ":" & "password" & "@127.0.0.1:10548/" & "computer name"
mount volume disk_URL


on error error_msg
display dialog error_msg buttons {"OK"} default button 1
end try

3. With Chronoscript you have the option of launching this Applescript prior to the sync to mount the volume (or you can run Chronosync from within this script itself if you can figure out the syntax).

I know this is not complete but, hey, its a start. I'd really like the SSH Tunnel manager syntax if anyone knows it.



[ Reply to This | # ]
A bit more of the script
Authored by: fronesis on Mar 23, '06 04:33:44PM

OK, thanks for the start. Here's what I've got to add to it.

SSH Tunnel Manger will automatically make a connection upon launch, and Chronosync can be scheduled to sync on launch. So we can do 1 and 3 fairly easily.

The one problem I've got: how to submit the password for Tunnel Manger within the applescript???

I've worked around this by writing in a delay, which gives me this:


try

tell application "SSH Tunnel Manager" to launch
delay 30

set the disk_URL to "afp://" & "username" & ":" & "password" & "@127.0.0.1:10548/" & "hard disc name"
mount volume disk_URL

tell application "ChronoSync" to launch


on error error_msg
display dialog error_msg buttons {"OK"} default button 1


end try

So, does anyone know how (or if it's possible) to put input the password through the script? With that, the whole thing would be automated.



[ Reply to This | # ]