Health Protection Scotland (HPS) has taken over the probe after the fifth victim was identified in the Tayside region, possibly up to 50 miles away from the first four cases reported in the Lothians area.
The investigation into the source has focused on compost and potting materials but so far it has found that a variety of products have been used for different purposes, which were bought from different retailers.
Gardeners are being warned to take precautions, including wearing gloves and a dust mask and washing their hands.
There have been nine cases in total in Scotland in the last four years and HPS said it was now investigating what it called an uncommon number of cases.
A national incident management team meeting involving doctors and public and environmental health specialists held yesterday heard the two people being treated in Edinburgh Royal Infirmary had improved.
One has been moved out of intensive care while the other who is still in the unit was said to have shown signs of improvement. Two patients were discharged earlier.
The condition of the fifth victim to have emerged in just a few weeks has not been made public.
Dr Martin Donaghy, medical director at Health Protection Scotland, offered the public advice after the meeting.
He said: "Following the identification of five cases of an unusual form of Legionnaires' disease in Lothian and Tayside, Health Protection Scotland is co-ordinating an incident management team to investigate this issue.
"It is believed the four cases from NHS Lothian and the one case from NHS Tayside have arisen from the Legionella longbeachae strain found in compost and potting materials. This is an uncommon but recognised international phenomenon."
Legionella longbeachae is an unusual and potentially deadly strain of Legionella which can cause a wide range of symptoms from mild flu-like illness to pneumonia.
The major source of human infection is considered to be commercial growing material and other composted matter such as bark and sawdust.
Dr Donaghy added: "While the risk of becoming unwell from gardening activities, such as working with compost, remains very low, we would recommend good hygiene in relation to gardening - wearing gloves, wearing a mask if dusty, particularly indoors, and washing hands immediately after use.
"We also advise that people should open any compost or potting mix bags carefully in a well ventilated area and if possible using a safety blade. Keep the door open in greenhouses or sheds when potting-up plants or filling hanging baskets.
"Finally, if you are going to smoke while gardening, please wash your hands before doing so."
HPS said between 2008 and 2012 nine cases of the longbeachae infection had been notified to doctors.
Two cases ended in the death of the victims and all others suffered from severe illness.
In the same period one case was reported in England and Wales.
HPS said the minister for public health had indicated an interest in exploring how best to prevent the infection and in particular whether bags of growing material should be labelled with a warning on how to avoid possible exposure to the organism.
Two schools in Edinburgh had their water systems treated for a separate strain of the bacteria and one staff member was being tested for suspected Legionella.
Cramond Primary School was found to have Legionella in its water and the system was cleaned while Cargilfield Preparatory School in Barnton was closed temporarily. In a statement on its website, Cargilfield said it had re-opened to all pupils yesterday.