If you keep an upright posture you're using your glutes and hamstrings to push yourself up the hill. Those muscles will help with cycling.
I agree with the conclusion but not with the rationale.
In cycling, almost all the energy is generated by knee extensors (quadriceps group, and specifically vastus lateralis); hip extensors (glutes); and ankle/foot extensors (calf muscles e.g. gastrocnemius), in this order. Relative contribution depends on bike fit / posture but for simplicity you can assume 4:3:2:1 quads/glutes/calves/everything else.
In walking/running, it's harder to talk about energy generation because the process is relatively inefficient, but uphill walking is a decent approximation to cycling in terms of muscle activation. It puts more load on ankle extensors and less load on hip extensors, but it's generally similar. Uphill walking is closer to cycling than running (running loads all sorts of muscles but manages to leave out our most important group - quads).
Hamstrings are not particularly important in either cycling or uphill walking (they play a secondary role in both) but they are worked hard during running.
It's good to work a few muscles that don't get worked hard when cycling. That helps reduce the chance of overuse and imbalance problems when you go back to riding more often. The glutes may be worked less than quads on the bike, but they are critical to producing power.
2006 Specialized Ruby Pro aka "Rhubarb" / and a backup road bike
Include your bike and push it uphill. It will seem more like a real bikeride.
A steep uphill walk can be good cardio exercise.
So BF what's the verdict? Would adding a heavy backpack make it a better workout?