Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Osascript and ssh



Nigel Smith wrote:

On 28/4/04 12:29, "Axel Luttgens" <email@hidden> wrote:



ssh expects a command, if any, as its last argument.
So, you have to explicitely make your

osascript -e 'return 2+2'

as a single argument for ssh.



Not strictly true,


Damn! You are right...
While reading your post, I remembered having encountered similar problems with ssh, and the solution I found at that time was the above one.
But I guess I later converted this into some kind of abusive generalization :-(

since:

ssh user@remoteIP ls -l /Users

...works as expected. But



In the precise case of your example, enclosing it with double quotes suffices:

ssh username@127.0.0.1 "osascript -e 'return 2+2'"



...does work, so I'm a happy bunny


And so I may feel somewhat happy too...

-- almost.


... or maybe not?


Can I also somehow pass in the required password so ssh doesn't need to ask
for it, when the command originates from the user "nobody" (ie. I can't use
my usual method of a pregenerated RSA key as in
<http://www.macosxhints.com/article.php?story=20011207004643312&query=ssh+pa
ssword+key>).


I confess I don't fully understand your question.
Do you mean you attributed a password to user "nobody"?
And in which context do you want to invoke ssh? From a shell script? From AppleScript's "do shell script"? As a cron job?
Could you provide somewhat more details?


Axel
_______________________________________________
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: 
 >Re: Osascript and ssh (From: Nigel Smith <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.