Re: Do shell and ssh
Re: Do shell and ssh
- Subject: Re: Do shell and ssh
- From: Doug McNutt <email@hidden>
- Date: Thu, 6 Apr 2006 10:49:42 -0600
At 13:16 +0200 4/6/06, Jay Louvion wrote:
>I'd like ot include an open and close ssh shell script in AS, but I'm not sure if that can be done. I need to input the administrator passwd to do the sudo and then the psswd to the server I'm trying to connect to. But I'm not sure if I'm allowed to that if I'm not in the Terminal...
I find that I can ask Terminal to establish an ssh connection in a two step process.
First an osascript that tells Terminal to do the ssh for which it would normally ask for a password after the initial connection.
I then delay a couple of seconds and "tell" Terminal to "password" in the same Terminal window..
Terminal accepts the output of the osascript as though it came from a tty. (I think that has to do with pty, pseudo tty, devices files in /dev/.)
Although I do my Applescripting from BBEdit worksheets it's quite possible that Do shell script might do pretty much the same thing. But what are you going to do with an established ssh session? Do shell script invokes a new instance of sh(ell) each time it's called. The chance of executing a remote command is nil.
--
--> On the eighth day, about 6 kiloyears ago, the Lord realized that free will would make man ask what existed before the Creation. So He installed a few gigayears of history complete with a big bang and a fossilized record of evolution. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden