SCP and terminal help needed
SCP and terminal help needed
- Subject: SCP and terminal help needed
- From: Charles Heizer <email@hidden>
- Date: Fri, 25 Apr 2003 20:17:45 -0700
Hello,
I'm trying to write a script to automate coping files to remote hosts.
But when I use SCP it does not work, but if I use SSH it works file.
Has anyone gotten SCP to work using AppleScript. Oh yea, I really want
to avoid using ssh keys for this solution.
I've included the syntax I'm using, if there is a problem with it I
really could use some help.
Thanks!
- Charles
Syntax Using scp - (does not work)
do script "scp -r /Users/admin/Desktop/NetWorker.pkg " & theUser & "@"
& theHost & ":/var/tmp"
delay 10
set thePrompt to last word of ((contents of window 1) as string)
if thePrompt is "no" then
do script "yes" in window 1
delay 5
end if
do script thePass in window 1
delay 5
Syntax Using ssh - (does work)
do script "ssh " & theUser & "@" & theHost
delay 10
set thePrompt to last word of ((contents of window 1) as string)
if thePrompt is "no" then -- asking us if we want to continue?
do script "yes" in window 1
delay 5
end if
do script thePass in window 1
delay 5
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.