Auditor general Caroline Gardner warned both NHS Highland and NHS Ayrshire and Arran they faced significant financial challenges that were likely to continue in the years ahead.
Neither had been able to meet their savings targets, and a significant proportion of their savings to date had been achieved on a one-off basis, the watchdog said, meaning they would struggle to balance their books.
NHS Ayrshire and Arran, which has a budget of £800m, received £23m in loan funding, or brokerage, from the Scottish Government last year, with additional loan funding required this year to help meet a projected shortfall of £22.4m.
However, the board had no plans to repay these loans, and would not be able to balance its budget by 2020-21, the auditor general said.
NHS Highland, with a budget of £780m, also required a loan of £15m from the Scottish Government last year, and this year was expected to face a funding gap of between £19m and £23m.
A long-term recovery plan was in place, but auditors had serious concerns over the board’s ability to deliver planned savings and achieve a balanced budget.
“Both NHS boards face significant financial challenges, and I have serious reservations about their ability to make the changes that are needed to achieve financial balance in future,” said Gardner.
John Burns, chief executive of NHS Ayrshire and Arran, said the level of savings required had been difficult to achieve, and maintaining financial stability had been an increasing challenge.
“This has been due to increasing unscheduled care demand, which has required extra hospital beds to be opened, as well as cost pressures, including new drugs and agency medical costs to sustain services,” he said.
A transformational change programme had recently been put into place, he said, but it could take several years for the benefits of that programme to be seen in terms of reduced operating costs.
A spokesman for NHS Highland said the board would continue to work closely with the Scottish Government as it developed plans to return to financial balance.
The auditor general will report on the overall financial health and performance of the NHS in Scotland later this month.