I mean...realistically, does a student even make enough money to make the itemized deductions (vs. just the standard) worth it? I mean, issues aside about obtaining the house in the first place (mortgage approval, all cash transaction, etc...), unless you've got a lucrative side job or other business that you're trying to pull yourself back in to a lower bracket.
So with no real tax benefit, closing costs, 5-6% in transaction costs related to selling, the potential for a maintenance bomb if not properly inspected, time spent on renting out the property/finding tenants, additional liability/insurance costs for possible commercial operation (airbnb), on top of the uncertainties of where you'll be in 4 years... I just can't see this panning out, unless there's an operating assumption that house prices will rise 10-15% a year over the next 4 years, or there's a very very strong likelihood the OP is staying in this house 7-8 years after acquisition...or if the rental market is extremely robust.
Just me thinking out loud...maybe it could work, don't know enough info.