Martin Schibbye and Johan Persson were detained in July after they entered Ethiopia from Somalia with rebels from the Ogaden National Liberation Front (ONLF).
The journalists were found guilty of the charges last week.
Prosecutors had asked for longer sentences.
The two journalists have acknowledged that they made contact with the rebels and entered the country illegally.
However, they say this was so they could report on the activities of a Swedish oil company, in a region the Ethiopian authorities will not allow journalists to enter.
The ONLF rebels have been fighting for the independence of the Ogaden region since 1984.
The convictions of Martin Schibbye and Johan Persson have been criticised by human rights groups and the Swedish government.