ethan666
10-23-2003, 04:31 PM
Hey there... I can't seem to find info on this, though it seems as though the solution is probably an easy one... Maybe I'm just not searching for the right thing.
I've created a simple AppleScript to set up an SSH tunnel using Terminal. The problem is that I stored my passwords in the script, and I'd rather pop-up a dialog box to enter the passwords. Any ideas on how I should modify my script to make this work? Or have you found a site that explains this?
Here's the script. I have to connect through two computers, so I'd need to set up a dialog box that would allow two passwords...
try
activate
ignoring application responses
tell application "Terminal"
activate
do script "ssh -l username1 -L 3689:localhost:3689 servername1" in window 1
delay 6
do script "password1" in window 1
delay 3
do script "ssh -l username2 -L 3689:localhost:3689 servername2" in window 1
delay 6
do script "password2" in window 1
end tell
end ignoring
on error error_message
beep
display dialog error_message buttons {"OK"} default button 1
end try
Thanks for your help... it is appreciated
I've created a simple AppleScript to set up an SSH tunnel using Terminal. The problem is that I stored my passwords in the script, and I'd rather pop-up a dialog box to enter the passwords. Any ideas on how I should modify my script to make this work? Or have you found a site that explains this?
Here's the script. I have to connect through two computers, so I'd need to set up a dialog box that would allow two passwords...
try
activate
ignoring application responses
tell application "Terminal"
activate
do script "ssh -l username1 -L 3689:localhost:3689 servername1" in window 1
delay 6
do script "password1" in window 1
delay 3
do script "ssh -l username2 -L 3689:localhost:3689 servername2" in window 1
delay 6
do script "password2" in window 1
end tell
end ignoring
on error error_message
beep
display dialog error_message buttons {"OK"} default button 1
end try
Thanks for your help... it is appreciated