Take a calm assured posture. A firm voice and gradual departure are better than a retreat in panic. Include the nature of your surroundings in your reaction. As a last resort, lie face down, protect your neck with your hands and arms, and don't move. This requires considerable courage, but resistance would be futile.
Numerous incidents exist where a bear has sniffed and departed without serious injury.
This is a remote wilderness. Animals are wild and unpredictable. Keep a clean camp and use common sense. Cook away from your campsite and especially keep food odors away from sleeping gear. Take every precaution to minimize encounters with bears.