• 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
Using scp and passing the password...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using scp and passing the password...


  • Subject: Using scp and passing the password...
  • From: Charles Heizer <email@hidden>
  • Date: Thu, 24 Apr 2003 09:44:47 -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.

  • Prev by Date: Re: AppleScript TID bug OS 10.2.5?
  • Next by Date: Re: How to specify a tab as a text delimiter
  • Previous by thread: Re: How to specify a tab as a text delimiter
  • Next by thread: System Events expires?
  • Index(es):
    • Date
    • Thread