Re: Providing passwords to shell commands
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.