Federer is working on a trial basis with coach Paul Annacone, former mentor to Pete Sampras, with the Swiss third seed's game already showing a few fresh touches.
"I'm glad to go through," said Federer, who needed seven set points to win the opening frame in 48 minutes.
"I was a bit rusty in the opening match and he really made me play. But I'm very happy with how it went tonight."
Federer approached the net more than he has done recently, showing off a favorite tactic of Annacone, who will work with the Swiss on an interim basis with a decision on a future partnership to be decided after the US Open.
Federer, who stalled at the quarter-finals at both Roland Garros and Wimbledon after winning the titles last season, has this week and the next at Cincinnati to hone his game into shape for a run at the final Grand Slam of the season, which starts on August 30.
After winning five titles in a row in New York, he lost the 2009 final to Juan Martin del Potro.
"It's always nice to come back after six weeks and get the win," said Federer. "I think that's really what counts the most tonight. It's normal that you're a bit rusty after six weeks. You have to work your way into playing matches again, even though you play a lot of practice sets and matches.
"Overall it was a good match. I think I really did some good things out there and a bit of a pity I had a bit of a letdown at 5-2 up in the first set.
"I had many options, I wanted to play on my terms against a player like that, and that's what I was able to do today somehow."
Fellow seed Robin Soderling, overcame Ernests Gulbis of Latvia 4-6, 6-4, 6-4 for a third-round spot, joining Wimbledon finalist Tomas Berdych - the quarter-final winner over Federer - in moving ahead in Canada.
Berdych is seeking his first 2010 title and began his latest quest with a 6-2, 6-4 defeat of Sergiy Stakhovsky.
"I've been to finals this year but have not won a tournament yet," said the 24-year-old, who has won six ATP titles, the last at Munich last year.
"But I wouldn't change anything I did, for anything."
In first-round matches, Washington winner David Nalbandian proved his fitness with a flying start as he upset Spanish tenth seed David Ferrer 7-5, 3-6, 6-3.
The number 45 said he has improved already since returning to the game last week, his first event since April following a 2009 hip operation and subsequent injury worries.
"I played more offensive today and tried to end the points a little faster. He's tough from the baseline without a lot of errors," said Nalbandian.
"There is no secret to my comeback, it's tough. Ferrer would not be your choice for first round, but I know I'm not seeded so I could play against anyone. I have to keep going going no matter who is in front of the net."
Serb Viktor Troicki upset Croatian 11th seed Marin Cilic 6-4, 7-6 (7/2), and Alexandr Dolgopolov rallied past German Philipp Petzschner 1-6, 6-2, 7-6 (7/4).
Italian Fabio Fognini kept injury comeback player Radek Stepanek winless since February with a 6-2, 6-4 result.