A Canadian man who pleaded guilty last fall to shooting at energy facilities in North and South Dakota was sentenced Monday to 25 years in prison.