Hi, I am trying to write an Applescript that opens Terminal, then logs in to another machine with ssh [email protected], then types in the password when it asks. NOTE: I can manually open Terminal and type in ssh [email protected] and it asks for password, I type it in, and it is connected. The problem is I can' get Applescript to do this same thing in Terminal? I can't get Applescript to automatically answer with a typed password?
Here is what I tried:
tell application "Terminal"
activate
do script "ssh [email protected]"
delay 6
do script "password"
*insert some other commands after logged in*
The Terminal opens and does try to ssh into the machine, but when it is asked for a password, Applescript doesn't type it in?
Does anyone know how to get Applescript to type in the password when it is requested by the ssh response?
I KNOW it CAN be done in Applescript/Terminal, because I can manually type it in and it works. I just can't get Applescript to do the same thing.........
-Thanks
Here is what I tried:
tell application "Terminal"
activate
do script "ssh [email protected]"
delay 6
do script "password"
*insert some other commands after logged in*
The Terminal opens and does try to ssh into the machine, but when it is asked for a password, Applescript doesn't type it in?
Does anyone know how to get Applescript to type in the password when it is requested by the ssh response?
I KNOW it CAN be done in Applescript/Terminal, because I can manually type it in and it works. I just can't get Applescript to do the same thing.........
-Thanks