I've used ssh-copy-id to copy my key to boxes that I log in to regularly in the past. That should solve the first log-in, and using Expect for the rest sounds a little hacky, but if it works, fine.
As of June 2025, Groklaw is back! This site was a really valuable resource in the now ancient fight between SCO and Linux. As it turned out, SCO was all hat and no cattle.Thanks to PJ for all her work, we owe her so much. RIP -- 2003 to 2013.