Generally, people need to defend themselves with a cane in an ambush situation. Since carrying a cane is an evident sign of impairment or a possible injury, your enemy will think that it will be easy to dominate you. In such a situation, make use of the cane for a counter-surprise. However, it would also be a good idea not to let your enemy known that you can use the cane as a self-defence weapon unless absolutely necessary.
Get on your guard by putting forward the foot which is on the side of the hand in which you are holding the cane. The distance between your feet should more than the width of your shoulders whereas the other side of your body should hang back. Point the cane directly towards your opponent, keeping it level with your eyes and your knuckles facing forward.
Wait for your opponent to strike. It is obvious that the strike will occur on the exposed parts of your body, i.e. the hand holding the cane and the corresponding half of your body. Since your cane is pointed directly towards your opponent, expect a forward stabbing motion from your opponent. The best way to counter this attack is to move the exposed body part away, and attack the head of the opponent at the same time.
Use the cane to immobilise your opponent. Defend yourself with your free hand so that you can use the cane for a quick attack. The best way to block your opponent's strike with your free hand is to anticipate the strike and rapidly reduce the distance between yourself and the opponent. This way you will be able to strike a blow to your opponent with your cane very easily.