Montgomery, 23, played under Dean Holdsworth during a loan spell with Newport last season and was released by Dagenham & Redbridge this summer.
Meanwhile, the Shots have decided to release injured defender Anthony Charles, 30.
Charles's contract expired at the end of last season and he is currently sidelined with a serious knee problem.
Holdsworth told the club website: "We are not in a luxury position to offer contracts to players that are injured long term.
He has been an excellent servant for Aldershot Town
Shots boss Dean Holdsworth on Anthony Charles
"I will give him every help that I can and I hope to see him back and recovered very soon.
"The most important thing for Anthony is for him to concentrate on the injury.
"If he wants help we will give it to him, but we are not in a financial position to offer him another contract with the cuts that we have had.
"He has been an excellent servant for Aldershot Town Football Club and we wish him well for the future."
Charles, who was club captain, scored 15 goals in 229 appearances during three separate spells with the League Two club.
Source: BBC Sport
Source: BBC Sport