Ryan left the game with just over five minutes remaining in the second period after a collision behind the net, but returned shortly after. However the Senators opted on the side of caution and kept him out of the lineup for the third period.
The Senators are 4-1 in pre-season play, while the Canadiens are 2-3-1. The teams meet again Thursday in Montreal.
This was their first meeting since the Senators eliminated the Canadiens last spring in the playoffs.
Montreal opened the scoring as Nygren beat Hammond with a shot from just inside the blueline. Ottawa tied the game minutes later as Conacher fed a trailing MacArthur.
Ottawa ended the period with a 2-1 lead on Ryan's power play goal.
The Senators made it 3-1 on Michalek's goal as he managed to dig the puck out during a goal-mouth scramble and roofed it over Budaj.
Conacher made it 4-1 with a power play goal, while Zibanejad picked up his first of the pre-season to make it 5-1.
Hammond made some of his best saves in the third despite allowing a weak goal glove side to Diaz.
Senators defenceman Patrick Wiercioch left the game with what appeared to be a leg injury late in the first period, but did return early in the second.