Go Back   The macosxhints Forums > Working with OS X > OS X Developer



 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 01-04-2006, 04:05 PM   #1
pkohler
Prospect
 
Join Date: Jan 2006
Posts: 18
Passing an scp/ssh password

Hi..

How do you pass along a password when using applescript to automate an scp process?

I have this

property app104 : "cd /Users/dev/Documents/ |scp my.server@my.domain:/export/home/me/filename.bz2"

tell application "Terminal"
run
do script app104
end tell

now, when i mod this to target an unsecure test box, it works fine. but the server i need to get the file from is secure and requires password authentication. I tried :

cd /Users/dev/Documents/ |scp my.server@my.domain:/export/home/me/filename.bz2 |mypassword

but it didnt work

I need to pass the password off as a second command but, when i do this, a second terminal window launches to receive only the password.

Some background on me: I really dont know anything about applescript or Terminal, I'm really just in desperate need of automating this as I need to leech a single file off a bunch of machines daily. I dont know what a shell or a bash is; I'm kind of drowning here pending the replacement of two staff members who have gone on to better things
pkohler is offline   Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.