Letter of the rule, doesn't actually matter where he hit him. The key wording is "defenseless" opponent
41.1 Boarding – A boarding penalty shall be imposed on any player who checks or pushes a defenseless opponent in such a manner that causes the opponent to hit or impact the boards violently or dangerously. The severity of the penalty, based upon the impact with the boards, shall be at the discretion of the Referee.
There is an enormous amount of judgment involved in the application of this rule by the Referees. The onus is on the player applying the check to ensure his opponent is not in a defenseless position and if so, he must avoid or minimize contact. However, in determining whether such contact could have been avoided, the circumstances of the check, including whether the opponent put himself in a vulnerable position immediately prior to or simultaneously with the check or whether the check was unavoidable can be considered. This balance must be considered by the Referees when applying this rule.