I use a vise like
this one to install / remove cotters. I got it at a yard sale for a couple bucks. A big C-clamp will work too, but the longer the bolt, the more it flexes.
If you reuse a cotter, it may help to file the flat spot flat again; but if you file one cotter, it's a good idea to file the other one to match. If the flats of your cotters are at different angles, your cranks will also be at different angles.