Chosen Solution
I have an iPhone 5s that I forgot the password to. I am trying to reset it by plugging it into my computer, powering it off and then pressing and holding the power and home button, but it just keeps turning off and on. The home button on the iPhone doesn’t always work.
Unfortunately with a lost passcode the only option is to reset the phone and lose all data and settings however if you have a backup in iTunes this can be restored later. Now the process of entering recovery mode without a home button. When I had this issue I came across a 3rd party application called “Reiboot” a quick google search and then installed on your pc or Mac is then just as simple as opening the program, plugging your phone in with the iPhone USB cable and after it is detected by Reiboot there is the option to click Enter Recovery Mode within the program. hope this answers your question.