Simple to replace, here are some helpful pics, tips and torques. Depend on where you look and what year you have, this might help confuse you. I just torqued mine at 80 ft/lbs.
Front drive gear nut(36mm)
Torque specifications per Haynes manual- gearbox sprocket nut 72-87 ft/lbs. (pg.17)
Forum Post
http://www.xs650.com/forum/showthread.php?t=1226
XS6501979-1984- E,F,G,H,SE,SF,2F,SG,SH,SJ,SK (US) 65 ft/lbs
XS650,XS650 SE (UK) 65 ft/lbs
XS650 D 1978 (US) 58-82 ft/lbs
XS1-XSB (22mm nut)...10-12 m-kg...72-87 ft-lbs
XSE (22mm nut).............5.0 m-kg...36 ft-lbs
XS 78-80 (22mm nut)......6.5 m-kg...47 ft-lbs
Repair manual says 85 ft/lbs
Thanks again to 5T for the sealant tip on the sprocket and locking washer, to try and avoid additional leaks.
Keep away from the case flange, when using the bench mounted repair of chocking the chain.