Winter squash and pumpkins can be preserved by canning, freezing or drying. The only method for canning is to use cubed pieces of flesh. See directions at in our Preserve it Fresh, Preserve it Safe: Vegetables publication.
Do not can any mashed or pureed products. These forms of winter squash can be frozen for later use. The USDA recommendations to can mashed winter squash were removed in the 1970s because of too much variation in density between batches to provide a consistent processing recommendation.