• 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: Providing passwords to shell commands
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Providing passwords to shell commands


  • Subject: Re: Providing passwords to shell commands
  • From: Sander Tekelenburg <email@hidden>
  • Date: Tue, 8 Jul 2003 14:09:06 +0200

At 12:52 +1000 UTC, on 7/8/03, Rob Werner wrote:

> Hey all,
>
> I'm trying to write a script that will SSH to a remote machine, and then
> issue a "reboot" command. However, both the SSH command and the reboot
> command require the user password for the remote machine to be entered after
> the command is issued. I have been unable to work out how to provide this
> password to the Terminal via AppleScript. Is this even possible?

i just posted a method here on June 11: "Working with remote interactive unix
apps". Essential (to your question) snippet reposted below:

do shell script "echo " & remoteIDPass & " | ssh -l " & remoteID & " " &
remoteIP & " sudo doStuff
-- all on one line



--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>
_______________________________________________
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.

References: 
 >Providing passwords to shell commands (From: Rob Werner <email@hidden>)

  • Prev by Date: Re: Creator type of packaged app bug?
  • Next by Date: Re: URL Access Scripting-download
  • Previous by thread: Providing passwords to shell commands
  • Next by thread: Re: Providing passwords to shell commands
  • Index(es):
    • Date
    • Thread