Vacancies at Nuffield Health Glasgow Hospital and Spire hospitals in Edinburgh were posted on the official Scottish health service recruitment website.
The positions included those for a healthcare assistant and a cardiac physiologist – someone who uses specialised equipment to assess patient heart problems.
A spokeswoman for Spire hospitals in Edinburgh said they saw the Nuffield posts advertised on the forum, applied to the relevant administration team and were given a password allowing their vacancies to be listed.
Neither firm was charged to promote their jobs.
As soon as the Scottish Government were made aware of the adverts, which were spotted by Scottish Labour, action was taken to remove them from the website.
However, the ability of private companies to use the NHS Scotland recruitment section of the official Scottish health-service portal, has sparked questions.
Dr Jean Turner, executive director of the Scotland Patients Association and a former independent MSP, said the error was unbelievable.
She added: "Private hospitals already send patients back to the NHS if the cases become too complicated or take too long, now it looks as though the NHS is advertising jobs for them as well.
"It is clearly not in the interests of NHS patients. The NHS loses enough staff overseas and to the private sector as it is without helping them along."
She said if private companies had been given passwords allowing them privileged access to the site it raised security questions.
The site is a key recruitment tool for health boards and allows those seeking jobs to search according to recruitment categories, region and key words.
Spire Healthcare, which runs Spire Murrayfield and Spire Shawfair Park in Edinburgh – the latter housing an IVF clinic – were seeking the physiologist.
They also sought a perioperative practitioner – part of the operating-theatre team. Nuffield Health Glasgow Hospital, based north-west of Glasgow city centre, was looking for a business-office assistant and a and healthcare assistant.
Neil Findlay, the new health spokesman for Scottish Labour, said: "For the NHS to be advertising jobs in the private sector is incredible. The NHS is in competition with the private sector for much-needed staff and the last thing we should be doing is letting the NHS promote opportunities for staff to leave to go private.
"We need to understand why these jobs were advertised and who authorised the adverts. We need to understand what checks are in place, when senior managers found out about them and whether this has happened before.
A Scottish Government spokeswoman said: "Private companies should not advertise on this website, this was an error and these vacancies have been removed. We are working with NHS National Services [who are in charge of the site] to make sure this does not happen again."
NHS National Services Scotland (NHS NSS) provides services and expertise to health boards across Scotland.
Last month The Herald revealed it was asking private firms to bid for work diagnosing and treating NHS patients on behalf of health boards for the next three years. It sought the bids in the British Medical Journal days after Health Secretary Alex Neil described the use of the independent sector as a "temporary phenomenon".
In a statement about the private-sector job adverts NHS NSS said: "The advertisements identified from recruitment agencies were placed in error and have now been removed. Our processes have been reviewed to ensure that this does not recur."