AHunter3
09-27-2004, 11:00 AM
The only AppleScript routine I have at my fingertips for having an AppleScript-capable application cause Terminal to make an SSH connection to our server is using
do script "ssh 192.168.xx.yyy" in Window 1
wait 4
do script "thePassword" in Window 1
which works except that sometimes on our oft-sludgy network the Terminal hasn't succeeded in knocking on Server's door and getting the "Password?" prompt by the time the next AppleScript line executes, and when that happens the Server's password appears in the Terminal window, visible to the user and plain as daylight.
Under MacOS 9, where I'm doing it via the program MacSSH PPC, I create the connection via AppleScript step 'getURL ssh UserName:thePassword@192.168.xx.yy' and no matter what happens the password never appears in plain text in the window.
I've tried 'do script ssh UserName:thePassword@192.168.xx.yy' under OS X but that doesn't fly.
Advice? Is there some way I can turn 'echo off' until I've made a connection, maybe?
do script "ssh 192.168.xx.yyy" in Window 1
wait 4
do script "thePassword" in Window 1
which works except that sometimes on our oft-sludgy network the Terminal hasn't succeeded in knocking on Server's door and getting the "Password?" prompt by the time the next AppleScript line executes, and when that happens the Server's password appears in the Terminal window, visible to the user and plain as daylight.
Under MacOS 9, where I'm doing it via the program MacSSH PPC, I create the connection via AppleScript step 'getURL ssh UserName:thePassword@192.168.xx.yy' and no matter what happens the password never appears in plain text in the window.
I've tried 'do script ssh UserName:thePassword@192.168.xx.yy' under OS X but that doesn't fly.
Advice? Is there some way I can turn 'echo off' until I've made a connection, maybe?