On April 25 this year, police arrested defendant James Stevens at a property in Raven Road, Nether Edge after finding what police described as a 'cannabis set-up' there, Sheffield Crown Court was told.
Louise Gallagher, prosecuting, said Stevens told police the he did not live at the property, and while he was in custody officers applied for a warrant to search his home in Morland Road, Gleadless Valley.
Once inside, officers found a sizable cannabis set-up containing some 74 plants, that were growing in tents spread across two rooms of the house.
Ms Gallagher told the court that a total of 4.7kg of cannabis was found at the property, with an estimated street value of approximately Â£40,700.
She said: "This defendant, when interviewed on the 25th of July, said he didn't live at the address, and hadn't lived there for five months.
"He said there were people constantly knocking on his door, trying to bully him into growing cannabis. He said he got fed up and handed over the keys."
Stevens, of Valley Grove, Barnsley claimed he had moved back in with his mother, while his housing benefit was used to pay for the rent on the Gleadless Valley property, and had not been involved with the cannabis factory in any way.
This claim was accepted by the Crown Prosecution Service, and Stevens pleaded guilty to a charge of allowing a premises to be used for the production of a Class B drug, namely cannabis, at an earlier hearing.
Defending, Carl Fritchley, said: "He is from an area of Sheffield where there is a gang culture; and there is clearly nothing to support the claim that he was going to benefit from this in term of lifestyle choices."
Recorder Jeremy Barnett sentenced Stevens to three months in prison, suspended for 18 months.
He said: "The Crown say common sense suggests you knew what was going on.
He added: "Your excuse that you didn't know what was happening because you were living at your mother's isn't good enough.
"I am going to sentence you on the basis you could have done something."