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: Quick AppleScript to open an SSH session to a client



----- "Peter Bukowinski" <email@hidden> wrote:
> 
> -- snip --
> 
> > Now here's a bit of a question - is it possible to have a script
> that sends a
> > Unix Command to activate SSH on a selected target machine, and then
> launch an
> > SSH session to it in the Terminal as your script does?  Having both
> of those
> > together would really float my boat, but I can't figure out the
> combination of
> > commands. 
> 
> Take John's script and insert the following code after 'end repeat'
> and
> before 'end tell' in the 'tell application' block:
> 
>     set startSSH to "/sbin/service ssh start"
>     set unixCommand to make new send unix command task with
> properties¬
>      {showing output:true, user:"root", script:startSSH}
>     set doUnixCommand to execute unixCommand on theComputers
> 
> That should do the trick.


Thank you much!

-- 
Nick McSpadden
email@hidden
Schools of the Sacred Heart

US Code for Copyright & Fair Use:
http://www.law.cornell.edu/uscode/html/uscode17/usc_sec_17_00000107----000-.html
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Remote-desktop mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/remote-desktop/email@hidden

This email sent to email@hidden

References: 
 >Re: Quick AppleScript to open an SSH session to a client (From: Peter Bukowinski <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.