sed is easier! You can do it with a oneliner:
`sed -i '398d' ~/.ssh/known_hosts`
I do this all the time. In fact I have a function in my .bashrc for this at work since I use it so much:
`function sedkey() { sed -i "${1}d" ~/.ssh/known_hosts }`
so I can run `sedkey 123` etc. Just another way to skin a cat I suppose.