Cut a piece of steel mesh screen that is at least six inches wider than the gap you are covering. This ensures that the persistent squirrels do not simply chew around your patch by attacking the weakened area of the wall.
Secure the sheet of steel mesh over the gap with heavy-duty steel bolts. Squirrels cannot chew through steel and this will act as a deterrent.
Look around the interior and exterior of the attic for other holes and gaps that a squirrel could fit through. Close any holes with sealant or caulking to keep squirrels and other wildlife from invading the attic.