on Sat, Sep 06, 2003 at 10:03:09PM -0400, Jeff Elkins ([EMAIL PROTECTED]) wrote: > I'm doing a lot of work with a Sharp Zaurus which requires several > re-flashes of the box daily - With my initrd.bin, ssh keys on the Z > regenerate with each flash. As a consequence, my host .ssh/known_hosts > is frequently outdated and I must edit it to remove references to > z,xxx.xxx.xxx.xxx. > > I'd like to gen up a script to nuke references in .ssh/known_hosts to the > Zaurus. It's trivial to edit known_hosts, but I'd like to eliminate this > step. > > Can someone point me in the right direction?
sed -e '/<pattern>/d' < ~/.ssh/known_hosts > ~/.ssh/known_hosts.tmp &&
mv ~/.ssh/known_hosts.tmp ~/.ssh/known_hosts
If you have known good state of known_hosts that you want to restore,
just copy it in from a template at startup or login.
Peace.
--
Karsten M. Self <[EMAIL PROTECTED]> http://kmself.home.netcom.com/
What Part of "Gestalt" don't you understand?
Defeat EU Software Patents! http://swpat.ffii.org/
pgp00000.pgp
Description: PGP signature

