Re: Trying to create a ssh command using applescript?
Re: Trying to create a ssh command using applescript?
- Subject: Re: Trying to create a ssh command using applescript?
- From: Courtney Moore <email@hidden>
- Date: Wed, 09 Apr 2003 17:16:28 -0500
I have almost answered my own question
If I run:
Tell application "Terminal"
Do script "ssh blah@blah" in window 1
Delay 10
Do script "mypassword" in window 1
End tell
It works if the Terminal is not already open or if there is a terminal
window on the screen, YEAH! But there are now two new problems.
The first problem is, if I run this script while Terminal is open but with
no active windows it gives me the error 3Terminal got an error:
NSArgumentEvaluationScriptError2.
The second problem is that if I am sshing into a host for the first time
then I will be prompted to give a yes no answer is there a way to trap for
this so I can include and if statement to output 3yes2??
Thanks Again for the help!
A new believer in AppleScript
On 4/9/03 3:51 PM, "Courtney Moore" <email@hidden> wrote:
>
I would like to automate an ssh session via applescript.
>
Has anyone had any luck doing this? I hit a road block when trying to
>
automate the password entry.
>
>
The script I am currently having no luck with is:
>
>
Tell application "Terminal"
>
Activate
>
Do script with command "ssh blah@blah2
>
End tell
>
>
The result of this script is a terminal session prompting me for the
>
password to ssh into blah@blah...
>
Can anyone PLEASE help!
>
Thanks in Advance
>
_______________________________________________
>
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.
_______________________________________________
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.