• 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
Re: Need help with SCP and do Shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help with SCP and do Shell script


  • Subject: Re: Need help with SCP and do Shell script
  • From: Axel Luttgens <email@hidden>
  • Date: Fri, 25 Jan 2008 23:47:00 +0100

On 25/01/08 22:18, Bernardo Höhl wrote:

Hi list,

I have to copy a few folders from my Mac to many new macs. One machine at a time.


Hello Bernardo,

If you have the opportunity to send folders(files) to remote machines, one could suppose you have some agreements with the owner(s) of those machines.
Could you elaborate, shouldn't it involve too private matters of course?


One solution I found was to use a "do script with command" that forces terminal to open a new window for each command, also makes me manually type "yes" for acceptance of adding the new machine to "knowhosts" file, followed by typing the remote's user password.

Puting an ssh key in the remote machine is not possible.


Hence my above question. ;-)
If the manager of the remote machines is not willing to agree with some kind of transfer protocol, I would tend to say you're somehow stuck...


I pass the ip address to the scp string also manually in a displayed dialog.

I wish I could enhance my script by passing the remote's password in a do shell script command, without opening the terminal window, also overiding the prompt for acceptance of the new machine into "knownhosts".

This could perhaps be achieved through a shell way, for example with the expect(1) command; but this often proves unreliable, because handling real conditions (when the slightest thing may go wrong) is often very difficult.
There are also some tricks through some other means (for example php), but they also heavily rely on the medium to be reliable and the other side to be cooperative.


I would be very happy to read your comments, and new approaches are very welcome.


As others already said, having an agreement with the manager of the remote machines allowing you to use a public key system would be the easiest way. But again, this of course depends on the context you are facing.

HTH (somehow),
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Need help with SCP and do Shell script
      • From: Bernardo Hoehl <email@hidden>
References: 
 >Need help with SCP and do Shell script (From: Bernardo Höhl <email@hidden>)

  • Prev by Date: Re: built&released application not functioning on other Macs..
  • Next by Date: RE: "a reference to"
  • Previous by thread: Re: Need help with SCP and do Shell script
  • Next by thread: Re: Need help with SCP and do Shell script
  • Index(es):
    • Date
    • Thread