• 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
SCP and terminal help needed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: SCP and terminal help needed
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: Window title of frontmost application
  • Next by Date: Re: Window title of frontmost application
  • Previous by thread: Window title of frontmost application
  • Next by thread: Re: SCP and terminal help needed
  • Index(es):
    • Date
    • Thread