I have had trouble with this for some time, and i think i have tried all ways, but keep having problems with momentum and letting the bike go.
Some of the trails i ride have some up hill sections through a wooded part, this has steps in them, some of the steps are far enough apart to fit a bike in some are not... the step is made up of logs and mud... how would you get up these without hammering the wheels on the steps....
first, what you are trying to do is a difficult riding technique to master and i'm not suggesting that i have mastered it. first, the steps that have enough distance between them to fit the bike is the easier one to be successful on. so, i would practice your technique on one of these. the ones were there is not enough distance between them are very difficult to maintain both momentum and balance.
1. pick a good line. often there's "burm" on the side you can use to go around or a gap in the rock or piles of rock/dirt in front of the step that effectively "lowers" the step height.
2. on the lead up to the step make sure you have the speed necessary. lofting the front end any amount will help reduce the loss of momentum.
3. once you get to what i call the "tipping point" you need shift your weight off the neutral/rear of the bike's center of balance to the front. this takes practice and feel but when it's done correctly shifting your weight actually helps preserve or even generate forward momentum to help you over the step.
4. throttle control is critical especially if traction is minimal.
5. if you lose your balance "toe stab" and back on the pegs. once both feet are off the pegs you become more of a passenger then a pilot.
this method works great for single steps. however, the degree of difficulty increases significantly with mutliple steps closely spaced. if this is the case you will have to adjust this by not shifting your weight as dramatically rear to front. if they are spaced too closely for the bike to fit and they are steep/squared off steps of any real height on a steep slick hill physics trumps technique and horsepower every time.