Angelo Mathews remained unbeaten on 39 runs and scored the highest score of 56 runs. He was bowled by Shakib after scoring his 41st Test half-century.
Jayasuriya was unbeaten on 28 at the time of the announcement, along with Vishwa Fernando, who was unbeaten on eight.
Debutant fast bowler Hasan Mahmood finished with 4-65 for Bangladesh.
Sri Lanka were missing Dinesh Chandimal in the field after he returned home due to a family emergency.
Sri Lanka, which has never lost a Test series to Bangladesh, defeated the hosts by 328 runs in the first Test in Sylhet.