scripting remote reboot of linux box

I have an Ubuntu box running a digital signage display in the school lobby and it needs to be reset every so often.

I’d like to make an AS app for the office manager to run on her mac to reboot the linux box (because she sits near it and knows when it’s frozen). This is easier than resetting it by hand because it’s above a drop ceiling and you have to drag a ladder down the hall to reach it.

if I do:

do shell script "ssh user:password@ubuntu-box.local"

I get

	"Pseudo-terminal will not be allocated because stdin is not a terminal.

ssh: connect to host ubuntu-box.local port 22: Connection refused"

It works fine in Terminal though. Anyone done something similar?

ssh doesn’t use the user:pass syntax so your script will never work. I think you’ll have to write a shell script “here document” to put all of the commands you want to run in one file. Try Google for “ssh here document”. Here’s one link I saw where Hayne explains a couple solutions near the end of the discussion.
http://hintsforums.macworld.com/showthread.php?t=48488

Of course, once you have the here document then you can run that via applescript.