Watch this video from This Old House to learn how to attach a deck to your house.
1 Remove old ledger and flashing, then inspect plywood sheathing for rot; patch sheathing, if necessary.
2 Cover sheathing with two layers of adhesive-backed flashing.
3 Fasten metal L-bracket to end of rim joists with special hanger screws.
4 Set ends of rim joists against house and screw L-brackets to plywood sheathing.
5 Install ledger between rim joists; fasten to house wall with 3-in. decking screws.
6 Secure ledger to sill with ½-inch-diameter lag screws; drive the long screws with an impact wrench.