The Messenger of Allah ﷺ said, "No person opens upon himself the door of begging except that Allah opens upon him a door of poverty. For a man to take his rope, head to the mountain, gather firewood on his back, and live off that, is better for him than to beg from people, whether they give him or refuse him."
أن رسول الله ﷺ قال: لا يفتح الإنسان على نفسه باب مسألة، إلا فتح الله عليه باب فقر، يأخذ الرجل حبله، فيعمد إلى الجبل، فيحتطب على ظهره، فيأكل به خير له من أن يسأل الناس معطى أو ممنوعا.
Ahmad (9421) narrated it, as did Tabari in Musnad Umar bin Khattab from Tahzib Athar (25), Ibn Hibban (3387), and Qudai in Musnad Shihab (821), all of them from the hadith of Ala bin Abdul-Rahman, from his father, from Abu Hurairah, who related it. Its chain of transmission is sahih.