According to StillTasty most canned goods are best stored from 2-5 years in the pantry.
From their site:
Store in a cool, dry area.
Discard all food from cans that are leaking, rusting, bulging or severely dented.
Storage time mentioned is for best quality only-after that the product's taste, texture and nutritional value may change, but in most cases, the unopened vegetables will still be safe to consume if they have been stored properly and the package is not damaged.
"Best By" "Best if Used By" and "Use By" dates on commercially packaged foods sold in the United States represent the manufacturer's estimate of how long the product will remain at peak quality-in most cases, the unopened product will still be safe to consume after that date, as long as it has been stored properly and the package is not damaged.