There are two seperate pins...one in one end of the connecting tube and one the other. The end of the connecting tube nearest the engine is a pig of a job to get at. Most likely you will need to loosen the three engine mounting bolts to get better access if that one need replacing. If it is still there and part of it has simply worked its way out, then if you can, knock it back in flush with a drift and then thread strong locking wire down the centre of it and wrap around the connecting tube...this will prevent it falling all the way out in future and will save you having to replace it now. If it is missing or you feel you need to replace it, then ideally yes remove the engine for access BUT I guarantee you won't get off the large metal friction disc on the underside between the blade and the engine...they weld themselves to the crankshaft over time, which means you won't be able to remove the engine fully. Like I say, you can just access the three bolt heads behind it enough to loosen them to give some clearance. If it is the outer roll pin you need to replace, then that can pretty much be done in situ- however if there is any of the old pin remaining in the hole, don't do what most people do and punch it out from the top down, as it will have nowhere for the broken part to come out the otherside and will lock the pulley against the chassis so you wont be able to move it......unless you loosen the engine bolts for clearance. Best punch it through at an offset angle so it can just drop out the other side. Also be careful punching these pin in or out too hard....it is very easy to shear off the pto shaft flush with the engine...these parts are obsolete, so if you do it will be scrap.
I used to charge just over an hours labour (assuming it all went to plan) for this job, and people couldn't understand why it cost so much just to replace two pins. When I said I had to take the engine off to do it, they didn't beleive me!