Here's the follow-up to my post a few days ago about removing crank cotters. If you're lucky enough to be able to reuse the old cotters (i.e., if you've removed the cranks only to access the bottom bracket), this process is much easier than if you need to replace the pins themselves, as was my situation.
First, some fundamentals about how cottered cranks work. As I mentioned in my post on removing cotters, the crank axle of a bicycle with cottered cranks has a flat notch cut on either side. This flat contacts the angled flat of the cotter pin, and this is what keeps the crank arms 180 degrees apart. You can see in the photo below that with the crank arms removed, the notches on either side of the axle face away from each other.
When you put the crank arms on the axle, you can see more clearly how the pin is supposed to fit.
In the image above, the pedal end of the crank arm is to the left, and is pointing toward the front of the bicycle. On the other side of the bicycle, the crank arm is pointing the opposite direction, toward the rear of the bicycle. Just to be perfectly clear, this is how it should look:
In the picture above, the bike is upside-down, but this is just for ease of photographing. Obviously, removal and installation of cotters is best done when the bike is upright, since the crank arms need to be supported while hammering.
If you can reuse the old cotters, all you need to do now is reverse the process of removing them. When you place the pin in its hole, make sure the flat of the pin contacts the flat of the axle. Then, with the crank arm supported with a block of wood or length of pipe, use a hammer to pound the pin from the smooth (non-threaded) end. Strike it just as hard as you had to when you removed the pin, as you'll be wedging the pin tightly into its spot. Just like removing them, one or two hard whacks should do it.
Once enough of the threaded end has emerged from the other side, put the nut on and tighten it with your fingers. Take another couple of whacks on the smooth side, just to seat the pin a bit more, and see if you can tighten the nut again with just your fingers. Repeat until the pin won't go any farther in, then tighten the nut down tight with a wrench. Repeat the process on the other side, but double-check as you work that the crank arms remain 180 degrees apart.
If you need to replace the crank cotters, all of this is complicated by the fact that the flat side on most new stock replacement cotters will need to be filed down in order to fit correctly against the crank axle. Many new pins are simply cut from a soft metal rod of more-or-less the correct diameter, then the flat is pressed into them, rather than machined to the correct angle. Even if the flat is machined, it is often way off from what it should be. I used a 6" general purpose mill file (single cut bastard), which removes metal more gradually and precisely than a double-cut file.
Ideally, you can use the shape of the old pin as a guide for filing the new one. The idea is to preserve the angle, but file it down so that it will fit your axle. This can be tricky, as you need to keep the file flat against the pin, but apply slightly more pressure to the down side of the angle. Sheldon Brown probably says it better. The photo below shows two new pins, the one on the left has been filed to fit my axle, the one on the right is how the pins arrived. This shows how much you may need to file to get the correct angle.
As you work on the filing, keep trying the pin in the crank so see how it's fitting against the flat of the axle. I found it helpful to support both crank arms with pieces of wood to make sure they were staying 180 degrees apart. That way, all I had to do was drop the pin into the hole to see if I needed to file the flat down any more. This took a lot of time, as I was proceeding cautiously, not wanting to take too much off, or ruin the angle of the pin. Sheldon Brown suggests using a bench-mounted vise to hold the pin in order to ensure that you're filing at the correct angle, but I have neither a vise, nor a bench to mount it on, so I held the pin with a pair of pliers wrapped in electrical tape (so as not to damage the pin with the teeth).
Eventually, I was able to file the angle of the pin down enough so that the threaded end of the pin was just poking out the other side of the crank arm. I lubed the pin with light oil to make it easier to drive, then gave it a couple of good whacks to drive it in. I actually had to do this several times, as the pin simply wouldn't drive far enough to get the nut threaded on. If this happens, it's no big deal. Just flip the crank over, drive the pin back out, do some more filing, and try again.
After a lot of trial and error, I was able to drive the pin far enough through that I could tighten the nut. Again, get it finger-tight, then give it a couple more whacks, tighten the nut again, give it a couple more whacks, etc., just to make sure it's seated as far as it will go, then tighten with a wrench. And again, keep checking as you work that the crank arms are still 180 degrees apart.
If you've filed the first pin correctly, it's easier to judge how much you need to file the second pin, since you'll already have one crank that is now fixed to the axle and not going anywhere. Sheldon Brown recommends replacing pins in pairs to preserve the 180 degree orientation of the cranks, but I was fortunate enough to be able to reuse my one good old pin, since I apparently did such a stellar job of filing the first one (how that happened, I don't know!).
Here's a few helpful things to keep in mind: 1) buy extra replacement cotters in case you mangle one of them trying to get it to fit; 2) the pins should be driven from opposite sides to maintain the 180 degree crank orientation; in other words, when the crank arms are parallel to the ground, the smooth head of the pin should be facing up on one side, and the threaded or nut-side of the pin on the other side should be facing up; 3) clean your file regularly as you work to prevent build-up of metal dust; 4) lube the pins before installation; 5) don't over-tighten the nuts, as this risks stripping the threads. The angled pin, driven tight against the axle is what keeps the crank attached, not the nuts. In other words, the nuts don't keep the pins from falling out, they just keep them from jiggling loose over time; 6) after a few dozen miles, repeat the process of hammering the pin and tightening the nut, as the pins will "settle" with use.
Finally, let me say that this was my first time doing this particular repair, and most of what I've said above comes from my reading of Sheldon Brown's guide. The idea in presenting my experience is not to claim it as definitive, but to 1) show that it can be done, even by a doofus like me; and 2) to try to give a bit more detail from one specific experience to supplement Sheldon's more general admonitions and advice.
PS--Glory of glories, you can now once again buy cotter pin presses, which were discontinued by Park Tools in the late 90s, from BikeSmith Design and Fabrication, which is where I got my replacement cotters. The presses are a little pricey at $55, but I imagine they're worth it, since they eliminate the hammering from this operation. I haven't used one myself, so this is not an endorsement or recommendation, just a heads-up.